knitr::opts_chunk$set(warning = FALSE)
source("Raman_functions.R")
library(png)
library(bmp)
library(pixmap)
library(baseline)
## 
## Attaching package: 'baseline'
## The following object is masked from 'package:stats':
## 
##     getCall
library(hyperSpec)
## Loading required package: lattice
## Loading required package: grid
## Loading required package: ggplot2
## Loading required package: xml2
## Package hyperSpec, version 0.100.0
## 
## To get started, try
##    vignette ("hyperspec")
##    package?hyperSpec 
##    vignette (package = "hyperSpec")
## 
## If you use this package please cite it appropriately.
##    citation("hyperSpec")
## will give you the correct reference.
## 
## The project homepage is http://hyperspec.r-forge.r-project.org
library(prospectr)
## prospectr version 0.2.6 -- 'chicago'
## check the github repository at: https://github.com/l-ramirez-lopez/prospectr/
## 
## Attaching package: 'prospectr'
## The following object is masked from 'package:baseline':
## 
##     baseline
library(ggplot2)
library(magrittr)
## Warning: package 'magrittr' was built under R version 4.0.5
library(ggpubr)
## 
## Attaching package: 'ggpubr'
## The following object is masked from 'package:hyperSpec':
## 
##     mean_sd
library(signal)
## 
## Attaching package: 'signal'
## The following object is masked from 'package:prospectr':
## 
##     resample
## The following objects are masked from 'package:stats':
## 
##     filter, poly
library(OpenSpecy)
## This version of bslib is designed to work with shiny version 1.6.0 or higher.
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✔ tibble  3.1.2     ✔ dplyr   1.0.6
## ✔ tidyr   1.1.3     ✔ stringr 1.4.0
## ✔ readr   1.4.0     ✔ forcats 0.5.0
## ✔ purrr   0.3.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::collapse()  masks hyperSpec::collapse()
## ✖ tidyr::extract()   masks magrittr::extract()
## ✖ dplyr::filter()    masks signal::filter(), stats::filter()
## ✖ dplyr::lag()       masks stats::lag()
## ✖ purrr::set_names() masks magrittr::set_names()

1 Introduction

The goal of this project is to not only enumerate total plastics but to also identify the and enumerate the plastic polymers polluting the Southern Ocean. This project’s goal is to identify the

read in .txt files

test2_10_8 <- read.delim(file = "ren4EB4_0__Time_0_test2_10_8.txt", header = F, sep = "\t")

#format table

colnames(test2_10_8) <-  c("Raman_shift", "Counts")
test2_10_8 <- as.data.frame(test2_10_8)

#repeat for each table
test_control <-  read.delim("renB232_0__Time_0_test_control.txt", header = F, sep = "\t")
colnames(test_control) <- c("Raman_shift", "Counts")
test_control <- as.data.frame(test_control)

pot_plastic <-  read.delim("ren79C7_0__Time_0_potentialPlastic_100ul.txt", header = F, sep = "\t")
colnames(pot_plastic) <- c("Raman_shift", "Counts")
pot_plastic <- as.data.frame(pot_plastic)

pot_plastic1 <-  read.delim("ren76AF_0__Time_0_potPla1_100ul.txt", header = F, sep = "\t")
colnames(pot_plastic1) <- c("Raman_shift", "Counts")
pot_plastic1 <- as.data.frame(pot_plastic1)

b <- list(test_control, pot_plastic,pot_plastic1, test2_10_8)
head(b)
## [[1]]
##      Raman_shift      Counts
## 1      1930.3320 13335.80664
## 2      1928.7832 13318.06445
## 3      1927.2324 13339.31250
## 4      1925.6816 13378.28613
## 5      1924.1309 13141.61231
## 6      1922.5801 13425.56445
## 7      1921.0273 13259.87598
## 8      1919.4746 13297.22461
## 9      1917.9238 13233.09766
## 10     1916.3711 13278.48633
## 11     1914.8164 13207.95410
## 12     1913.2637 13420.70508
## 13     1911.7109 13192.48828
## 14     1910.1562 13149.37012
## 15     1908.6016 13376.47070
## 16     1907.0469 13170.92676
## 17     1905.4922 13195.36328
## 18     1903.9355 13280.86523
## 19     1902.3809 13086.72754
## 20     1900.8242 13271.82422
## 21     1899.2676 13195.02734
## 22     1897.7109 13142.35254
## 23     1896.1543 13141.07715
## 24     1894.5977 13226.48144
## 25     1893.0391 13059.89453
## 26     1891.4805 13178.97363
## 27     1889.9219 13241.85742
## 28     1888.3633 13485.93750
## 29     1886.8047 13203.99609
## 30     1885.2441 13170.65137
## 31     1883.6855 13140.52637
## 32     1882.1250 13342.75586
## 33     1880.5645 13046.67578
## 34     1879.0039 13144.73047
## 35     1877.4414 13050.58691
## 36     1875.8809 13203.03125
## 37     1874.3184 13020.88379
## 38     1872.7559 13058.04981
## 39     1871.1934 13168.79590
## 40     1869.6309 13087.54785
## 41     1868.0664 13260.60938
## 42     1866.5039 13214.55176
## 43     1864.9395 13155.72656
## 44     1863.3750 13151.26465
## 45     1861.8105 13226.69531
## 46     1860.2461 12945.85938
## 47     1858.6797 13083.58984
## 48     1857.1152 13195.71289
## 49     1855.5488 13149.74121
## 50     1853.9824 12918.64453
## 51     1852.4160 13201.47461
## 52     1850.8496 13122.02930
## 53     1849.2812 13127.15527
## 54     1847.7129 13097.19629
## 55     1846.1465 13177.26074
## 56     1844.5781 13019.78418
## 57     1843.0078 12956.40137
## 58     1841.4395 13089.02344
## 59     1839.8711 12995.38769
## 60     1838.3008 13064.24023
## 61     1836.7305 12989.75781
## 62     1835.1602 13150.91309
## 63     1833.5898 12998.45703
## 64     1832.0176 13035.42383
## 65     1830.4473 12938.74023
## 66     1828.8750 12875.50000
## 67     1827.3027 12902.92969
## 68     1825.7305 12933.52637
## 69     1824.1582 12933.90918
## 70     1822.5840 12827.81738
## 71     1821.0117 12817.10156
## 72     1819.4375 12717.43555
## 73     1817.8633 12863.97461
## 74     1816.2891 12915.18164
## 75     1814.7129 12869.53320
## 76     1813.1387 12850.88379
## 77     1811.5625 12919.51660
## 78     1809.9863 12910.38379
## 79     1808.4102 12701.40723
## 80     1806.8340 12755.75586
## 81     1805.2578 12765.68945
## 82     1803.6797 12794.63965
## 83     1802.1016 12923.41406
## 84     1800.5254 12741.59473
## 85     1798.9473 12654.89648
## 86     1797.3672 12744.02637
## 87     1795.7891 12662.11426
## 88     1794.2090 12774.94922
## 89     1792.6309 12740.54688
## 90     1791.0508 12918.19141
## 91     1789.4707 12746.13965
## 92     1787.8887 12819.31738
## 93     1786.3086 12691.63769
## 94     1784.7266 12718.94727
## 95     1783.1445 12953.30859
## 96     1781.5625 12771.95215
## 97     1779.9805 12939.84277
## 98     1778.3984 12875.45801
## 99     1776.8145 12970.60742
## 100    1775.2324 13008.87500
## 101    1773.6484 12922.41602
## 102    1772.0645 13045.90332
## 103    1770.4805 13191.42773
## 104    1768.8945 13089.20898
## 105    1767.3105 13397.11816
## 106    1765.7246 13444.70606
## 107    1764.1387 13307.81348
## 108    1762.5527 13506.71777
## 109    1760.9668 13711.83984
## 110    1759.3789 13883.78711
## 111    1757.7930 13967.44824
## 112    1756.2051 14128.24219
## 113    1754.6172 14175.60059
## 114    1753.0293 14229.23438
## 115    1751.4414 14536.23926
## 116    1749.8516 14868.28711
## 117    1748.2637 14485.96387
## 118    1746.6738 14732.94727
## 119    1745.0840 14723.50293
## 120    1743.4941 14993.91113
## 121    1741.9023 14956.12207
## 122    1740.3125 14941.92090
## 123    1738.7207 14962.29199
## 124    1737.1289 14666.91504
## 125    1735.5371 14725.02734
## 126    1733.9453 14509.90625
## 127    1732.3535 14396.91504
## 128    1730.7598 14153.70410
## 129    1729.1680 14122.43359
## 130    1727.5742 14008.02832
## 131    1725.9805 13664.67285
## 132    1724.3848 13625.68457
## 133    1722.7910 13549.08594
## 134    1721.1953 13483.49219
## 135    1719.6016 13383.44824
## 136    1718.0059 13444.82910
## 137    1716.4082 13087.93359
## 138    1714.8125 13191.63574
## 139    1713.2168 13104.26562
## 140    1711.6191 13098.33691
## 141    1710.0215 13045.45606
## 142    1708.4238 13089.61523
## 143    1706.8262 12958.53418
## 144    1705.2285 13170.05566
## 145    1703.6289 13084.36328
## 146    1702.0312 12972.12891
## 147    1700.4316 13060.02246
## 148    1698.8320 13241.64746
## 149    1697.2305 13429.44434
## 150    1695.6309 13421.89356
## 151    1694.0293 13617.37988
## 152    1692.4297 13826.83594
## 153    1690.8281 13972.19531
## 154    1689.2266 14364.09961
## 155    1687.6230 14613.83398
## 156    1686.0215 14902.46484
## 157    1684.4180 15399.98633
## 158    1682.8164 15699.24121
## 159    1681.2129 16074.76660
## 160    1679.6074 16534.30664
## 161    1678.0039 16667.92969
## 162    1676.4004 17175.44922
## 163    1674.7949 17542.54883
## 164    1673.1895 17579.30469
## 165    1671.5840 18008.44727
## 166    1669.9785 18186.75781
## 167    1668.3730 18461.49414
## 168    1666.7656 18578.94141
## 169    1665.1582 18688.55859
## 170    1663.5508 18739.01953
## 171    1661.9434 18693.03906
## 172    1660.3359 19031.12109
## 173    1658.7285 18986.65039
## 174    1657.1191 19105.38477
## 175    1655.5098 18826.28711
## 176    1653.9004 18979.18164
## 177    1652.2910 18886.60938
## 178    1650.6816 18834.44922
## 179    1649.0723 18668.97852
## 180    1647.4609 18565.66211
## 181    1645.8496 18408.07617
## 182    1644.2383 18210.21680
## 183    1642.6270 18198.58398
## 184    1641.0156 17974.48633
## 185    1639.4023 17514.80273
## 186    1637.7891 17123.52344
## 187    1636.1758 16932.34375
## 188    1634.5625 16578.54297
## 189    1632.9492 15913.50000
## 190    1631.3359 15518.24512
## 191    1629.7207 15149.48340
## 192    1628.1055 14805.64941
## 193    1626.4922 14565.67090
## 194    1624.8750 14172.58398
## 195    1623.2598 13920.46191
## 196    1621.6445 13639.05664
## 197    1620.0273 13401.07324
## 198    1618.4102 13229.67969
## 199    1616.7930 12964.05762
## 200    1615.1758 13126.67676
## 201    1613.5586 12779.28906
## 202    1611.9395 12643.70508
## 203    1610.3223 12540.61426
## 204    1608.7031 12536.40039
## 205    1607.0840 12681.95019
## 206    1605.4629 12626.76856
## 207    1603.8438 12577.78125
## 208    1602.2227 12516.47168
## 209    1600.6035 12587.85352
## 210    1598.9824 12443.28223
## 211    1597.3613 12408.25098
## 212    1595.7383 12362.44336
## 213    1594.1172 12282.74609
## 214    1592.4941 12221.57324
## 215    1590.8711 12166.58887
## 216    1589.2480 12108.54590
## 217    1587.6250 12173.72852
## 218    1586.0020 12269.67578
## 219    1584.3770 12227.04004
## 220    1582.7539 11947.41211
## 221    1581.1289 12020.26465
## 222    1579.5039 11919.24902
## 223    1577.8789 11847.49902
## 224    1576.2520 11997.20898
## 225    1574.6270 12048.46191
## 226    1573.0000 11784.59668
## 227    1571.3730 11878.90039
## 228    1569.7461 11911.70703
## 229    1568.1172 11899.95410
## 230    1566.4902 11759.20117
## 231    1564.8613 11873.38867
## 232    1563.2344 11898.49023
## 233    1561.6055 11817.68262
## 234    1559.9746 11775.26856
## 235    1558.3457 11932.30762
## 236    1556.7148 12135.29102
## 237    1555.0859 12049.89844
## 238    1553.4551 11924.68066
## 239    1551.8242 11785.71973
## 240    1550.1934 11827.64941
## 241    1548.5605 11823.59570
## 242    1546.9277 11752.14356
## 243    1545.2969 11729.72852
## 244    1543.6641 11763.97559
## 245    1542.0312 11672.67871
## 246    1540.3965 11760.49023
## 247    1538.7637 11851.32422
## 248    1537.1289 11718.75781
## 249    1535.4941 11886.03711
## 250    1533.8594 11811.62988
## 251    1532.2246 11839.68750
## 252    1530.5898 12063.38867
## 253    1528.9531 12109.71875
## 254    1527.3164 11989.48633
## 255    1525.6797 12008.31348
## 256    1524.0430 12051.56934
## 257    1522.4062 12245.97070
## 258    1520.7695 12260.15039
## 259    1519.1309 12384.21387
## 260    1517.4922 12525.00977
## 261    1515.8535 12504.02832
## 262    1514.2148 12560.84570
## 263    1512.5762 12664.91211
## 264    1510.9355 12898.52734
## 265    1509.2949 12763.15723
## 266    1507.6543 12787.86328
## 267    1506.0137 12771.41797
## 268    1504.3730 12796.11035
## 269    1502.7324 12679.14941
## 270    1501.0898 12898.75391
## 271    1499.4473 12867.07227
## 272    1497.8047 12946.51269
## 273    1496.1621 13010.70117
## 274    1494.5195 12936.41504
## 275    1492.8750 12941.25488
## 276    1491.2324 12908.07324
## 277    1489.5879 12820.16894
## 278    1487.9434 12723.18164
## 279    1486.2969 12977.30176
## 280    1484.6523 12763.32324
## 281    1483.0059 12693.75098
## 282    1481.3613 12776.08789
## 283    1479.7148 12736.91113
## 284    1478.0664 12782.76562
## 285    1476.4199 12795.20801
## 286    1474.7734 12942.70117
## 287    1473.1250 13105.30176
## 288    1471.4766 13345.19043
## 289    1469.8281 13762.40918
## 290    1468.1797 13839.82031
## 291    1466.5293 14305.25879
## 292    1464.8809 14661.37891
## 293    1463.2305 15079.46875
## 294    1461.5801 15656.44238
## 295    1459.9297 15849.98144
## 296    1458.2793 15896.55469
## 297    1456.6270 15987.01074
## 298    1454.9766 15921.52539
## 299    1453.3242 15545.84668
## 300    1451.6719 15359.44629
## 301    1450.0195 15279.00879
## 302    1448.3652 15275.73144
## 303    1446.7129 15050.19434
## 304    1445.0586 15080.22168
## 305    1443.4043 15203.93652
## 306    1441.7500 15354.79590
## 307    1440.0938 15697.44434
## 308    1438.4395 16024.84180
## 309    1436.7832 16208.64453
## 310    1435.1270 16484.45898
## 311    1433.4707 16808.45312
## 312    1431.8145 16868.22461
## 313    1430.1582 16952.10547
## 314    1428.5000 16891.14453
## 315    1426.8418 16882.99023
## 316    1425.1855 16730.09375
## 317    1423.5254 16640.57227
## 318    1421.8672 16579.72461
## 319    1420.2090 16485.75195
## 320    1418.5488 16593.68555
## 321    1416.8887 16245.20898
## 322    1415.2285 16199.55176
## 323    1413.5684 16215.63672
## 324    1411.9062 16282.89062
## 325    1410.2461 16359.14160
## 326    1408.5840 16324.02539
## 327    1406.9219 16543.13086
## 328    1405.2598 16563.63086
## 329    1403.5977 16567.58008
## 330    1401.9336 16724.85742
## 331    1400.2695 16894.08594
## 332    1398.6074 16958.06250
## 333    1396.9434 17340.48438
## 334    1395.2773 17691.20117
## 335    1393.6133 18423.17383
## 336    1391.9473 18974.67383
## 337    1390.2812 20007.74219
## 338    1388.6152 20741.73633
## 339    1386.9492 21901.50195
## 340    1385.2832 22702.26758
## 341    1383.6152 23511.68164
## 342    1381.9492 24044.86914
## 343    1380.2812 24795.17969
## 344    1378.6133 24899.23047
## 345    1376.9453 25307.40234
## 346    1375.2754 25280.96094
## 347    1373.6055 25224.57617
## 348    1371.9375 25165.22070
## 349    1370.2676 24727.12695
## 350    1368.5957 24429.91602
## 351    1366.9258 24144.80273
## 352    1365.2539 23612.95312
## 353    1363.5840 22701.40430
## 354    1361.9121 21814.17578
## 355    1360.2402 21109.73438
## 356    1358.5664 19964.62891
## 357    1356.8945 19210.07812
## 358    1355.2207 18998.23047
## 359    1353.5469 18496.66992
## 360    1351.8730 18353.76562
## 361    1350.1992 18451.32812
## 362    1348.5254 18324.91406
## 363    1346.8496 18020.94141
## 364    1345.1738 18118.50781
## 365    1343.4980 17355.20508
## 366    1341.8223 17252.99805
## 367    1340.1465 16736.26758
## 368    1338.4688 16316.66894
## 369    1336.7930 16344.43066
## 370    1335.1152 16288.72461
## 371    1333.4375 16188.34180
## 372    1331.7578 16159.50391
## 373    1330.0801 16026.42481
## 374    1328.4004 15975.29688
## 375    1326.7207 16141.53320
## 376    1325.0410 16236.25684
## 377    1323.3613 16400.87305
## 378    1321.6816 16337.80078
## 379    1320.0000 16182.53809
## 380    1318.3184 16121.02441
## 381    1316.6367 16172.52637
## 382    1314.9551 16111.03906
## 383    1313.2734 15954.46777
## 384    1311.5918 15780.13477
## 385    1309.9082 16093.09473
## 386    1308.2246 16254.43750
## 387    1306.5410 16956.16797
## 388    1304.8574 17550.70898
## 389    1303.1719 18599.13477
## 390    1301.4863 20127.85547
## 391    1299.8027 22476.27539
## 392    1298.1172 25370.95508
## 393    1296.4297 28777.43359
## 394    1294.7441 32480.40820
## 395    1293.0566 36593.81250
## 396    1291.3711 40443.12891
## 397    1289.6836 43320.35156
## 398    1287.9961 45335.72656
## 399    1286.3066 46061.83203
## 400    1284.6191 45697.91797
## 401    1282.9297 43657.03125
## 402    1281.2402 40835.63281
## 403    1279.5508 37327.44531
## 404    1277.8613 33820.78906
## 405    1276.1699 29704.85352
## 406    1274.4785 26182.16602
## 407    1272.7891 22910.85352
## 408    1271.0977 20612.00586
## 409    1269.4043 19095.84570
## 410    1267.7129 18137.30469
## 411    1266.0195 17329.83594
## 412    1264.3281 16952.43945
## 413    1262.6348 16479.24023
## 414    1260.9395 16277.84082
## 415    1259.2461 15838.93555
## 416    1257.5508 15571.36816
## 417    1255.8574 15445.52344
## 418    1254.1621 15114.74219
## 419    1252.4668 14935.96973
## 420    1250.7695 14646.71777
## 421    1249.0742 14518.23242
## 422    1247.3770 14090.69043
## 423    1245.6797 13822.43262
## 424    1243.9824 13373.13574
## 425    1242.2852 13087.48144
## 426    1240.5859 12846.11621
## 427    1238.8887 12668.14453
## 428    1237.1895 12444.63281
## 429    1235.4902 12228.57422
## 430    1233.7910 11987.60449
## 431    1232.0898 11874.67773
## 432    1230.3906 11770.62012
## 433    1228.6895 11350.57812
## 434    1226.9883 11387.75879
## 435    1225.2871 11419.04590
## 436    1223.5840 11459.13086
## 437    1221.8828 11566.75293
## 438    1220.1797 11424.71777
## 439    1218.4766 11699.64551
## 440    1216.7734 11777.78711
## 441    1215.0684 11905.78223
## 442    1213.3652 12007.31348
## 443    1211.6602 11859.46582
## 444    1209.9551 11773.26856
## 445    1208.2500 11864.49609
## 446    1206.5449 11803.25098
## 447    1204.8379 11661.43457
## 448    1203.1328 11588.53809
## 449    1201.4258 11273.99219
## 450    1199.7188 11164.60059
## 451    1198.0098 10941.05859
## 452    1196.3027 10881.55371
## 453    1194.5938 10885.00293
## 454    1192.8848 10919.17383
## 455    1191.1758 11014.76562
## 456    1189.4668 11045.96582
## 457    1187.7578 11290.62305
## 458    1186.0469 11412.37891
## 459    1184.3359 11854.14551
## 460    1182.6250 12108.68555
## 461    1180.9141 12522.34473
## 462    1179.2031 13054.12109
## 463    1177.4902 13236.67285
## 464    1175.7773 13551.99219
## 465    1174.0645 14090.48047
## 466    1172.3516 14261.00391
## 467    1170.6387 14708.64160
## 468    1168.9238 15045.22754
## 469    1167.2090 15444.36719
## 470    1165.4941 16053.27051
## 471    1163.7793 16140.07812
## 472    1162.0645 16633.42773
## 473    1160.3477 16794.36914
## 474    1158.6328 17044.09375
## 475    1156.9160 17344.67578
## 476    1155.1992 17669.87305
## 477    1153.4805 17667.40039
## 478    1151.7637 17685.30273
## 479    1150.0449 17857.42578
## 480    1148.3262 17904.36719
## 481    1146.6074 18000.73438
## 482    1144.8887 17954.56055
## 483    1143.1680 18123.55664
## 484    1141.4473 18033.76953
## 485    1139.7285 18420.63086
## 486    1138.0059 18845.08789
## 487    1136.2852 19285.33203
## 488    1134.5645 19503.20508
## 489    1132.8418 19899.54688
## 490    1131.1191 20048.96484
## 491    1129.3965 20193.95898
## 492    1127.6738 20018.25781
## 493    1125.9492 20517.10742
## 494    1124.2266 20383.46289
## 495    1122.5020 20178.83398
## 496    1120.7773 19898.91992
## 497    1119.0527 19858.24609
## 498    1117.3262 19146.76172
## 499    1115.5996 18867.25977
## 500    1113.8750 18569.05469
## 501    1112.1484 18069.72266
## 502    1110.4199 17918.02734
## 503    1108.6934 17517.47461
## 504    1106.9648 17286.38672
## 505    1105.2363 16889.04297
## 506    1103.5078 16921.41992
## 507    1101.7793 16819.30469
## 508    1100.0508 16803.97266
## 509    1098.3203 16730.83398
## 510    1096.5898 16651.94531
## 511    1094.8594 16935.69922
## 512    1093.1289 16762.91602
## 513    1091.3984 16964.20508
## 514    1089.6660 16989.27344
## 515    1087.9336 16998.45312
## 516    1086.2012 16854.66406
## 517    1084.4688 16744.11914
## 518    1082.7363 16897.58008
## 519    1081.0020 16527.50000
## 520    1079.2676 16386.82227
## 521    1077.5332 16321.16016
## 522    1075.7988 16218.05664
## 523    1074.0625 16227.37793
## 524    1072.3281 15937.08008
## 525    1070.5918 15849.96875
## 526    1068.8555 15731.21973
## 527    1067.1191 15598.12793
## 528    1065.3809 15328.37402
## 529    1063.6445 15061.61914
## 530    1061.9062 15005.00293
## 531    1060.1680 14785.89648
## 532    1058.4297 14561.13672
## 533    1056.6895 14215.72363
## 534    1054.9512 13998.37598
## 535    1053.2109 14009.58887
## 536    1051.4707 13984.88184
## 537    1049.7305 13622.66894
## 538    1047.9883 13734.46875
## 539    1046.2480 13717.01367
## 540    1044.5059 13660.81250
## 541    1042.7637 13550.10840
## 542    1041.0195 13608.73633
## 543    1039.2773 13465.10254
## 544    1037.5332 13335.87207
## 545    1035.7910 13365.83203
## 546    1034.0469 13152.11328
## 547    1032.3008 12994.37695
## 548    1030.5566 12883.98828
## 549    1028.8105 12739.27148
## 550    1027.0645 12591.75586
## 551    1025.3184 12590.33789
## 552    1023.5723 12397.11523
## 553    1021.8262 12245.47949
## 554    1020.0781 12281.33594
## 555    1018.3301 12284.27637
## 556    1016.5820 12367.29785
## 557    1014.8340 12207.22168
## 558    1013.0840 12154.42481
## 559    1011.3359 12214.54981
## 560    1009.5859 12341.79883
## 561    1007.8359 12447.56250
## 562    1006.0859 12404.75098
## 563    1004.3340 12474.75391
## 564    1002.5820 12313.47168
## 565    1000.8301 12390.59766
## 566     999.0781 12202.29492
## 567     997.3262 12128.19824
## 568     995.5742 12044.14941
## 569     993.8203 12087.04102
## 570     992.0664 12074.31445
## 571     990.3125 11914.79590
## 572     988.5586 11812.34473
## 573     986.8027 11885.15918
## 574     985.0469 11601.87988
## 575     983.2910 11640.53418
## 576     981.5352 11532.53809
## 577     979.7793 11403.24219
## 578     978.0215 11336.61328
## 579     976.2656 11157.62598
## 580     974.5078 11032.76660
## 581     972.7500 10826.91016
## 582     970.9902 10713.55371
## 583     969.2324 10665.62891
## 584     967.4727 10388.94434
## 585     965.7129 10461.87109
## 586     963.9531 10287.62207
## 587     962.1914 10254.03418
## 588     960.4316 10189.22656
## 589     958.6699 10273.48340
## 590     956.9082 10306.61426
## 591     955.1465 10312.77246
## 592     953.3828 10083.47168
## 593     951.6211 10435.68945
## 594     949.8574 10416.29199
## 595     948.0938 10433.75488
## 596     946.3281 10490.88867
## 597     944.5645 10522.49316
## 598     942.7988 10527.16894
## 599     941.0332 10564.41211
## 600     939.2676 10808.34766
## 601     937.5020 10892.21875
## 602     935.7363 11111.90723
## 603     933.9688 11175.86133
## 604     932.2012 11412.35547
## 605     930.4336 11780.26172
## 606     928.6660 11907.63867
## 607     926.8965 12268.19238
## 608     925.1270 12564.98438
## 609     923.3574 12839.03320
## 610     921.5879 13240.08594
## 611     919.8184 13229.98828
## 612     918.0469 13276.37109
## 613     916.2773 13400.37012
## 614     914.5059 13620.27734
## 615     912.7324 13521.20606
## 616     910.9609 13590.04394
## 617     909.1875 13554.48633
## 618     907.4160 13710.70215
## 619     905.6426 13830.19336
## 620     903.8672 13848.15527
## 621     902.0938 13891.47070
## 622     900.3184 13788.26074
## 623     898.5430 13856.91699
## 624     896.7676 13642.52441
## 625     894.9922 13778.75098
## 626     893.2168 13751.65625
## 627     891.4395 13892.01367
## 628     889.6621 13997.13574
## 629     887.8848 14335.67481
## 630     886.1074 14548.91406
## 631     884.3281 15082.57031
## 632     882.5488 15665.17090
## 633     880.7695 16376.77246
## 634     878.9902 16905.41992
## 635     877.2109 17651.51758
## 636     875.4297 18147.33008
## 637     873.6504 19017.73438
## 638     871.8691 19564.92773
## 639     870.0859 20299.89648
## 640     868.3047 21166.39062
## 641     866.5215 21617.33398
## 642     864.7383 22404.59570
## 643     862.9551 23159.25195
## 644     861.1719 23861.69727
## 645     859.3887 24486.74805
## 646     857.6035 24926.58594
## 647     855.8184 25249.97070
## 648     854.0332 25406.56836
## 649     852.2480 25270.50391
## 650     850.4609 25259.06641
## 651     848.6738 24685.10938
## 652     846.8867 23602.18945
## 653     845.0996 22683.41016
## 654     843.3125 21672.76367
## 655     841.5234 20149.51172
## 656     839.7344 19191.62891
## 657     837.9453 17856.89844
## 658     836.1562 16913.95508
## 659     834.3672 15798.25488
## 660     832.5762 14829.69043
## 661     830.7852 14111.46973
## 662     828.9941 13241.44336
## 663     827.2031 12498.80176
## 664     825.4102 11909.96484
## 665     823.6191 11448.32422
## 666     821.8262 10940.87891
## 667     820.0332 10373.72070
## 668     818.2383 10057.70898
## 669     816.4453  9709.79394
## 670     814.6504  9336.96094
## 671     812.8555  9053.44238
## 672     811.0605  8967.79199
## 673     809.2637  8692.84180
## 674     807.4688  8454.20703
## 675     805.6719  8325.61426
## 676     803.8750  8241.59961
## 677     802.0781  8271.67773
## 678     800.2793  8090.37256
## 679     798.4805  8096.83496
## 680     796.6836  7979.59033
## 681     794.8828  7965.23047
## 682     793.0840  7861.96191
## 683     791.2852  7801.79883
## 684     789.4844  7779.15576
## 685     787.6836  7766.24121
## 686     785.8828  7728.34814
## 687     784.0801  7734.87695
## 688     782.2793  7699.78223
## 689     780.4766  7691.05615
## 690     778.6738  7762.76221
## 691     776.8691  7741.54688
## 692     775.0664  7778.55566
## 693     773.2617  7927.79053
## 694     771.4570  8011.84082
## 695     769.6523  8137.40430
## 696     767.8477  8334.91602
## 697     766.0410  8461.72852
## 698     764.2344  8589.86621
## 699     762.4277  8645.98438
## 700     760.6211  8797.53711
## 701     758.8145  8762.29199
## 702     757.0059  8745.03906
## 703     755.1973  8796.91894
## 704     753.3887  8656.64941
## 705     751.5801  8718.19824
## 706     749.7715  8619.45703
## 707     747.9609  8580.15430
## 708     746.1504  8647.19922
## 709     744.3398  8493.31836
## 710     742.5273  8496.85840
## 711     740.7168  8563.87305
## 712     738.9043  8688.79981
## 713     737.0918  8621.94531
## 714     735.2793  8880.55859
## 715     733.4648  8772.33008
## 716     731.6523  8764.76953
## 717     729.8379  8937.72949
## 718     728.0234  9051.36816
## 719     726.2070  9080.93359
## 720     724.3926  9223.40234
## 721     722.5762  9295.59082
## 722     720.7598  9414.54199
## 723     718.9434  9699.94238
## 724     717.1270  9866.89356
## 725     715.3086  9850.83398
## 726     713.4902 10181.30859
## 727     711.6719 10528.12500
## 728     709.8535 10663.11035
## 729     708.0332 10733.44824
## 730     706.2148 11008.45117
## 731     704.3945 11121.25098
## 732     702.5723 11280.68652
## 733     700.7520 11271.18359
## 734     698.9316 11361.88086
## 735     697.1094 11304.33398
## 736     695.2871 11213.88867
## 737     693.4648 11019.24414
## 738     691.6406 10795.89356
## 739     689.8164 10515.06836
## 740     687.9922 10557.83789
## 741     686.1680 10408.74512
## 742     684.3438 10321.37109
## 743     682.5195 10132.68262
## 744     680.6934 10093.33887
## 745     678.8672 10088.23731
## 746     677.0410 10094.08789
## 747     675.2129 10082.14551
## 748     673.3867 10093.46484
## 749     671.5586 10084.26269
## 750     669.7305 10076.43066
## 751     667.9004 10045.36231
## 752     666.0723 10257.59082
## 753     664.2422 10492.95019
## 754     662.4121 10479.56250
## 755     660.5820 10717.48926
## 756     658.7520 10817.38965
## 757     656.9199 10951.37109
## 758     655.0879 11083.92481
## 759     653.2559 11000.82031
## 760     651.4238 11208.33008
## 761     649.5898 11297.08301
## 762     647.7578 11287.61719
## 763     645.9238 11421.29590
## 764     644.0879 11520.83789
## 765     642.2539 11851.97559
## 766     640.4180 11681.63477
## 767     638.5840 11872.29590
## 768     636.7480 12105.07715
## 769     634.9102 12061.39844
## 770     633.0742 12330.77246
## 771     631.2363 12459.86719
## 772     629.3984 12466.46777
## 773     627.5605 12296.25684
## 774     625.7227 12335.52441
## 775     623.8828 12092.01367
## 776     622.0430 11869.00293
## 777     620.2031 11919.21094
## 778     618.3633 11726.23047
## 779     616.5234 11555.06934
## 780     614.6816 11468.17285
## 781     612.8398 11354.16699
## 782     610.9980 11350.14551
## 783     609.1562 11267.42676
## 784     607.3125 11182.03320
## 785     605.4688 11136.00977
## 786     603.6250 10969.33106
## 787     601.7812 10969.46777
## 788     599.9375 10896.41894
## 789     598.0918 10712.29688
## 790     596.2461 10698.94531
## 791     594.4004 10536.62402
## 792     592.5527 10565.29297
## 793     590.7070 10515.43359
## 794     588.8594 10476.42481
## 795     587.0117 10484.79004
## 796     585.1641 10479.62305
## 797     583.3145 10682.73047
## 798     581.4668 10620.73047
## 799     579.6172 10681.77051
## 800     577.7676 10868.46777
## 801     575.9160 10856.45898
## 802     574.0664 11034.92090
## 803     572.2148 11056.63965
## 804     570.3633 11437.49902
## 805     568.5117 11545.50391
## 806     566.6582 11603.52441
## 807     564.8066 11664.21484
## 808     562.9531 11720.82910
## 809     561.0996 11542.75781
## 810     559.2441 11324.32129
## 811     557.3906 11089.81055
## 812     555.5352 11108.76953
## 813     553.6797 10974.12207
## 814     551.8242 10688.66992
## 815     549.9668 10560.91699
## 816     548.1094 10314.74023
## 817     546.2539 10065.98633
## 818     544.3945  9895.40234
## 819     542.5371  9447.73633
## 820     540.6797  9262.58106
## 821     538.8203  9164.92481
## 822     536.9609  9061.93555
## 823     535.0996  8836.67383
## 824     533.2402  8780.84570
## 825     531.3789  8723.69922
## 826     529.5176  8846.57227
## 827     527.6562  8758.54981
## 828     525.7949  8678.62305
## 829     523.9316  8749.07031
## 830     522.0684  8751.04297
## 831     520.2051  8799.97266
## 832     518.3418  8909.23926
## 833     516.4785  8917.87793
## 834     514.6133  8985.50293
## 835     512.7480  8843.99219
## 836     510.8828  8812.43555
## 837     509.0156  8692.46777
## 838     507.1504  8668.99707
## 839     505.2832  8604.02441
## 840     503.4160  8567.19629
## 841     501.5488  8598.64941
## 842     499.6797  8612.69141
## 843     497.8105  8587.92773
## 844     495.9414  8662.15625
## 845     494.0723  8693.55664
## 846     492.2031  8668.79004
## 847     490.3320  8593.24219
## 848     488.4609  8716.84180
## 849     486.5898  8686.74219
## 850     484.7188  8687.37793
## 851     482.8477  8641.27344
## 852     480.9746  8691.31641
## 853     479.1016  8765.36035
## 854     477.2285  8827.36035
## 855     475.3535  8807.94824
## 856     473.4805  8843.23144
## 857     471.6055  8869.16309
## 858     469.7305  9023.06934
## 859     467.8535  8999.62988
## 860     465.9785  9117.45312
## 861     464.1016  9179.26660
## 862     462.2246  9318.30273
## 863     460.3477  9370.71875
## 864     458.4688  9545.59082
## 865     456.5918  9544.68652
## 866     454.7129  9739.39648
## 867     452.8340  9949.97852
## 868     450.9531  9917.05859
## 869     449.0742  9970.58789
## 870     447.1934  9989.52637
## 871     445.3125  9940.66894
## 872     443.4316 10125.70898
## 873     441.5488  9978.53125
## 874     439.6660  9917.75684
## 875     437.7832 10030.96484
## 876     435.9004  9978.17090
## 877     434.0176  9989.11035
## 878     432.1328 10054.45117
## 879     430.2480  9980.46094
## 880     428.3633  9952.92773
## 881     426.4785  9681.41602
## 882     424.5938  9717.60059
## 883     422.7070  9694.12305
## 884     420.8203  9728.96191
## 885     418.9336  9720.06543
## 886     417.0449  9679.38574
## 887     415.1582  9847.94531
## 888     413.2695  9837.70312
## 889     411.3809  9835.40625
## 890     409.4902  9764.30176
## 891     407.6016  9851.98340
## 892     405.7109  9856.29785
## 893     403.8203  9797.13867
## 894     401.9297  9882.10644
## 895     400.0391  9963.07031
## 896     398.1465  9807.46387
## 897     396.2539  9769.50781
## 898     394.3613  9547.97949
## 899     392.4668  9594.61231
## 900     390.5742  9349.46484
## 901     388.6797  9336.72754
## 902     386.7852  9276.49219
## 903     384.8906  9203.09180
## 904     382.9941  9075.64941
## 905     381.0996  8981.23242
## 906     379.2031  8827.53320
## 907     377.3066  8747.71582
## 908     375.4082  8874.81641
## 909     373.5117  8733.10644
## 910     371.6133  8864.10254
## 911     369.7148  8700.07519
## 912     367.8145  8733.59766
## 913     365.9160  8706.55957
## 914     364.0156  8724.27441
## 915     362.1152  8607.79199
## 916     360.2148  8776.77637
## 917     358.3145  8712.93457
## 918     356.4121  8756.92383
## 919     354.5098  8719.40332
## 920     352.6074  8545.23926
## 921     350.7051  8761.33691
## 922     348.8008  8722.52832
## 923     346.8965  8677.17090
## 924     344.9922  8714.54297
## 925     343.0879  8636.39648
## 926     341.1836  8672.44824
## 927     339.2773  8691.42871
## 928     337.3711  8694.66113
## 929     335.4648  8634.94922
## 930     333.5586  8876.79590
## 931     331.6504  8827.55469
## 932     329.7422  8994.55176
## 933     327.8340  9000.33106
## 934     325.9258  9059.80859
## 935     324.0176  9110.09180
## 936     322.1074  9056.92676
## 937     320.1973  9150.38086
## 938     318.2871  9148.26465
## 939     316.3750  9356.78320
## 940     314.4648  9389.93652
## 941     312.5527  9304.07617
## 942     310.6406  9433.97168
## 943     308.7285  9274.94629
## 944     306.8145  9368.19922
## 945     304.9004  9377.79492
## 946     302.9863  9504.94238
## 947     301.0723  9630.72461
## 948     299.1582  9624.58691
## 949     297.2422  9720.26269
## 950     295.3262  9725.85254
## 951     293.4102  9953.23242
## 952     291.4941  9847.89551
## 953     289.5762  9930.39160
## 954     287.6582 10048.05176
## 955     285.7402 10242.56152
## 956     283.8223 10343.15430
## 957     281.9043 10448.91309
## 958     279.9844 10480.37695
## 959     278.0645 10501.40918
## 960     276.1445 10687.78027
## 961     274.2246 10863.65332
## 962     272.3027 10947.04785
## 963     270.3809 10912.00879
## 964     268.4590 11081.20508
## 965     266.5371 11150.18945
## 966     264.6133 11546.78320
## 967     262.6914 11610.42969
## 968     260.7676 11905.37012
## 969     258.8438 12282.03027
## 970     256.9180 12385.73340
## 971     254.9941 12750.42383
## 972     253.0684 13208.43066
## 973     251.1426 13304.06250
## 974     249.2148 13801.96582
## 975     247.2891 14150.42969
## 976     245.3613 14749.09277
## 977     243.4336 15145.16699
## 978     241.5059 15469.74805
## 979     239.5781 15970.47852
## 980     237.6484 16267.50781
## 981     235.7188 16753.57617
## 982     233.7891 16791.20703
## 983     231.8594 16774.42773
## 984     229.9277 16977.77734
## 985     227.9961 16984.26562
## 986     226.0645 17007.57617
## 987     224.1328 16685.39453
## 988     222.2012 16882.11328
## 989     220.2676 17148.58398
## 990     218.3340 17342.52148
## 991     216.4004 17452.34375
## 992     214.4668 17646.12500
## 993     212.5312 17844.99023
## 994     210.5957 18079.93750
## 995     208.6602 18242.44922
## 996     206.7246 18336.44922
## 997     204.7871 18214.80859
## 998     202.8516 18227.45898
## 999     200.9141 18077.51172
## 1000    198.9766 17839.90234
## 1001    197.0371 17701.72070
## 1002    195.0996 17278.61328
## 1003    193.1602 17045.21680
## 1004    191.2207 16488.39844
## 1005    189.2812 16359.67090
## 1006    187.3398 16082.83789
## 1007    185.3984 15910.46582
## 1008    183.4570 15726.58301
## 1009    181.5156 15703.72168
## 1010    179.5742 15710.47754
## 1011    177.6309 15854.93262
## 1012    175.6875 15901.53906
## 1013    173.7441 16081.90527
## 1014    171.8008 16318.77734
## 1015    169.8574 16655.83398
## 1016    167.9121 17055.72656
## 1017    165.9668 17614.80469
## 1018    164.0215 18051.56836
## 1019    162.0742 18680.82617
## 1020    160.1289 19167.24414
## 1021    158.1816 19962.89648
## 1022    156.2344 20786.43750
## 1023    154.2852 21504.36328
## 1024    152.3379   514.55194
## 1025    150.3887    30.78923
## 1026    148.4395    14.10857
## 1027    146.4902    29.49314
## 1028    144.5391    11.53821
## 1029    142.5898    19.22605
## 1030    140.6387    17.94031
## 1031    138.6875   -15.37397
## 
## [[2]]
##      Raman_shift       Counts
## 1      1930.3320 2.730663e+05
## 2      1928.7832 2.736308e+05
## 3      1927.2324 2.737284e+05
## 4      1925.6816 2.738018e+05
## 5      1924.1309 2.729725e+05
## 6      1922.5801 2.725288e+05
## 7      1921.0273 2.724107e+05
## 8      1919.4746 2.727904e+05
## 9      1917.9238 2.723680e+05
## 10     1916.3711 2.716945e+05
## 11     1914.8164 2.713900e+05
## 12     1913.2637 2.717826e+05
## 13     1911.7109 2.718708e+05
## 14     1910.1562 2.710356e+05
## 15     1908.6016 2.709133e+05
## 16     1907.0469 2.721643e+05
## 17     1905.4922 2.713184e+05
## 18     1903.9355 2.708538e+05
## 19     1902.3809 2.701371e+05
## 20     1900.8242 2.700216e+05
## 21     1899.2676 2.704234e+05
## 22     1897.7109 2.700284e+05
## 23     1896.1543 2.693640e+05
## 24     1894.5977 2.694302e+05
## 25     1893.0391 2.693936e+05
## 26     1891.4805 2.694903e+05
## 27     1889.9219 2.685571e+05
## 28     1888.3633 2.684614e+05
## 29     1886.8047 2.681285e+05
## 30     1885.2441 2.679416e+05
## 31     1883.6855 2.678863e+05
## 32     1882.1250 2.683693e+05
## 33     1880.5645 2.675418e+05
## 34     1879.0039 2.671854e+05
## 35     1877.4414 2.667444e+05
## 36     1875.8809 2.664364e+05
## 37     1874.3184 2.664151e+05
## 38     1872.7559 2.651328e+05
## 39     1871.1934 2.654334e+05
## 40     1869.6309 2.658730e+05
## 41     1868.0664 2.657143e+05
## 42     1866.5039 2.652376e+05
## 43     1864.9395 2.657457e+05
## 44     1863.3750 2.651332e+05
## 45     1861.8105 2.647943e+05
## 46     1860.2461 2.640690e+05
## 47     1858.6797 2.639796e+05
## 48     1857.1152 2.635326e+05
## 49     1855.5488 2.636589e+05
## 50     1853.9824 2.634117e+05
## 51     1852.4160 2.633593e+05
## 52     1850.8496 2.616381e+05
## 53     1849.2812 2.621396e+05
## 54     1847.7129 2.626025e+05
## 55     1846.1465 2.620099e+05
## 56     1844.5781 2.615163e+05
## 57     1843.0078 2.621018e+05
## 58     1841.4395 2.610507e+05
## 59     1839.8711 2.605418e+05
## 60     1838.3008 2.607019e+05
## 61     1836.7305 2.607123e+05
## 62     1835.1602 2.601369e+05
## 63     1833.5898 2.602890e+05
## 64     1832.0176 2.597315e+05
## 65     1830.4473 2.593030e+05
## 66     1828.8750 2.591133e+05
## 67     1827.3027 2.587630e+05
## 68     1825.7305 2.588915e+05
## 69     1824.1582 2.581298e+05
## 70     1822.5840 2.579850e+05
## 71     1821.0117 2.576544e+05
## 72     1819.4375 2.567712e+05
## 73     1817.8633 2.570921e+05
## 74     1816.2891 2.576336e+05
## 75     1814.7129 2.569636e+05
## 76     1813.1387 2.551449e+05
## 77     1811.5625 2.561212e+05
## 78     1809.9863 2.563611e+05
## 79     1808.4102 2.565913e+05
## 80     1806.8340 2.550231e+05
## 81     1805.2578 2.549602e+05
## 82     1803.6797 2.550337e+05
## 83     1802.1016 2.538171e+05
## 84     1800.5254 2.541300e+05
## 85     1798.9473 2.537078e+05
## 86     1797.3672 2.533174e+05
## 87     1795.7891 2.537347e+05
## 88     1794.2090 2.528902e+05
## 89     1792.6309 2.528073e+05
## 90     1791.0508 2.537592e+05
## 91     1789.4707 2.527808e+05
## 92     1787.8887 2.523326e+05
## 93     1786.3086 2.505768e+05
## 94     1784.7266 2.525340e+05
## 95     1783.1445 2.511187e+05
## 96     1781.5625 2.518439e+05
## 97     1779.9805 2.511120e+05
## 98     1778.3984 2.516188e+05
## 99     1776.8145 2.513863e+05
## 100    1775.2324 2.513844e+05
## 101    1773.6484 2.507321e+05
## 102    1772.0645 2.501496e+05
## 103    1770.4805 2.499602e+05
## 104    1768.8945 2.499066e+05
## 105    1767.3105 2.514286e+05
## 106    1765.7246 2.494808e+05
## 107    1764.1387 2.499460e+05
## 108    1762.5527 2.506222e+05
## 109    1760.9668 2.485324e+05
## 110    1759.3789 2.490369e+05
## 111    1757.7930 2.488087e+05
## 112    1756.2051 2.487443e+05
## 113    1754.6172 2.487886e+05
## 114    1753.0293 2.481702e+05
## 115    1751.4414 2.481013e+05
## 116    1749.8516 2.488271e+05
## 117    1748.2637 2.473815e+05
## 118    1746.6738 2.483226e+05
## 119    1745.0840 2.473747e+05
## 120    1743.4941 2.476204e+05
## 121    1741.9023 2.472342e+05
## 122    1740.3125 2.471687e+05
## 123    1738.7207 2.464905e+05
## 124    1737.1289 2.468258e+05
## 125    1735.5371 2.460584e+05
## 126    1733.9453 2.454547e+05
## 127    1732.3535 2.453849e+05
## 128    1730.7598 2.453372e+05
## 129    1729.1680 2.450227e+05
## 130    1727.5742 2.459382e+05
## 131    1725.9805 2.449854e+05
## 132    1724.3848 2.447088e+05
## 133    1722.7910 2.448791e+05
## 134    1721.1953 2.450180e+05
## 135    1719.6016 2.443028e+05
## 136    1718.0059 2.443133e+05
## 137    1716.4082 2.439180e+05
## 138    1714.8125 2.440038e+05
## 139    1713.2168 2.430388e+05
## 140    1711.6191 2.432546e+05
## 141    1710.0215 2.432105e+05
## 142    1708.4238 2.437297e+05
## 143    1706.8262 2.433226e+05
## 144    1705.2285 2.437633e+05
## 145    1703.6289 2.432438e+05
## 146    1702.0312 2.427916e+05
## 147    1700.4316 2.420958e+05
## 148    1698.8320 2.428834e+05
## 149    1697.2305 2.428159e+05
## 150    1695.6309 2.410380e+05
## 151    1694.0293 2.419877e+05
## 152    1692.4297 2.420141e+05
## 153    1690.8281 2.407245e+05
## 154    1689.2266 2.410681e+05
## 155    1687.6230 2.414926e+05
## 156    1686.0215 2.417454e+05
## 157    1684.4180 2.408313e+05
## 158    1682.8164 2.401530e+05
## 159    1681.2129 2.406725e+05
## 160    1679.6074 2.416702e+05
## 161    1678.0039 2.409205e+05
## 162    1676.4004 2.406885e+05
## 163    1674.7949 2.406839e+05
## 164    1673.1895 2.414986e+05
## 165    1671.5840 2.403447e+05
## 166    1669.9785 2.403277e+05
## 167    1668.3730 2.413832e+05
## 168    1666.7656 2.403980e+05
## 169    1665.1582 2.405257e+05
## 170    1663.5508 2.408540e+05
## 171    1661.9434 2.413595e+05
## 172    1660.3359 2.408820e+05
## 173    1658.7285 2.417417e+05
## 174    1657.1191 2.418782e+05
## 175    1655.5098 2.409038e+05
## 176    1653.9004 2.409379e+05
## 177    1652.2910 2.422301e+05
## 178    1650.6816 2.418757e+05
## 179    1649.0723 2.427790e+05
## 180    1647.4609 2.431185e+05
## 181    1645.8496 2.428867e+05
## 182    1644.2383 2.428582e+05
## 183    1642.6270 2.440552e+05
## 184    1641.0156 2.446888e+05
## 185    1639.4023 2.437808e+05
## 186    1637.7891 2.446311e+05
## 187    1636.1758 2.452361e+05
## 188    1634.5625 2.459169e+05
## 189    1632.9492 2.465121e+05
## 190    1631.3359 2.456464e+05
## 191    1629.7207 2.469801e+05
## 192    1628.1055 2.485810e+05
## 193    1626.4922 2.490900e+05
## 194    1624.8750 2.492861e+05
## 195    1623.2598 2.492300e+05
## 196    1621.6445 2.498529e+05
## 197    1620.0273 2.510942e+05
## 198    1618.4102 2.507532e+05
## 199    1616.7930 2.514140e+05
## 200    1615.1758 2.520745e+05
## 201    1613.5586 2.531659e+05
## 202    1611.9395 2.532603e+05
## 203    1610.3223 2.530659e+05
## 204    1608.7031 2.537563e+05
## 205    1607.0840 2.539679e+05
## 206    1605.4629 2.547643e+05
## 207    1603.8438 2.541252e+05
## 208    1602.2227 2.547778e+05
## 209    1600.6035 2.557463e+05
## 210    1598.9824 2.567452e+05
## 211    1597.3613 2.559813e+05
## 212    1595.7383 2.561149e+05
## 213    1594.1172 2.565905e+05
## 214    1592.4941 2.561183e+05
## 215    1590.8711 2.560746e+05
## 216    1589.2480 2.556966e+05
## 217    1587.6250 2.565769e+05
## 218    1586.0020 2.565177e+05
## 219    1584.3770 2.571527e+05
## 220    1582.7539 2.563653e+05
## 221    1581.1289 2.564677e+05
## 222    1579.5039 2.559270e+05
## 223    1577.8789 2.559924e+05
## 224    1576.2520 2.547077e+05
## 225    1574.6270 2.552223e+05
## 226    1573.0000 2.557920e+05
## 227    1571.3730 2.545204e+05
## 228    1569.7461 2.548273e+05
## 229    1568.1172 2.545134e+05
## 230    1566.4902 2.537742e+05
## 231    1564.8613 2.536710e+05
## 232    1563.2344 2.531902e+05
## 233    1561.6055 2.531501e+05
## 234    1559.9746 2.528552e+05
## 235    1558.3457 2.516094e+05
## 236    1556.7148 2.527905e+05
## 237    1555.0859 2.509317e+05
## 238    1553.4551 2.512048e+05
## 239    1551.8242 2.498652e+05
## 240    1550.1934 2.498763e+05
## 241    1548.5605 2.492792e+05
## 242    1546.9277 2.487052e+05
## 243    1545.2969 2.484133e+05
## 244    1543.6641 2.483174e+05
## 245    1542.0312 2.475878e+05
## 246    1540.3965 2.482575e+05
## 247    1538.7637 2.464065e+05
## 248    1537.1289 2.457635e+05
## 249    1535.4941 2.464345e+05
## 250    1533.8594 2.443603e+05
## 251    1532.2246 2.446247e+05
## 252    1530.5898 2.435453e+05
## 253    1528.9531 2.444485e+05
## 254    1527.3164 2.433146e+05
## 255    1525.6797 2.424195e+05
## 256    1524.0430 2.420103e+05
## 257    1522.4062 2.412242e+05
## 258    1520.7695 2.406827e+05
## 259    1519.1309 2.415181e+05
## 260    1517.4922 2.399864e+05
## 261    1515.8535 2.392562e+05
## 262    1514.2148 2.387705e+05
## 263    1512.5762 2.388613e+05
## 264    1510.9355 2.382538e+05
## 265    1509.2949 2.376221e+05
## 266    1507.6543 2.379082e+05
## 267    1506.0137 2.370818e+05
## 268    1504.3730 2.366976e+05
## 269    1502.7324 2.358154e+05
## 270    1501.0898 2.364365e+05
## 271    1499.4473 2.355335e+05
## 272    1497.8047 2.352701e+05
## 273    1496.1621 2.342398e+05
## 274    1494.5195 2.345473e+05
## 275    1492.8750 2.337579e+05
## 276    1491.2324 2.342493e+05
## 277    1489.5879 2.332231e+05
## 278    1487.9434 2.326427e+05
## 279    1486.2969 2.327084e+05
## 280    1484.6523 2.321588e+05
## 281    1483.0059 2.318038e+05
## 282    1481.3613 2.312970e+05
## 283    1479.7148 2.317274e+05
## 284    1478.0664 2.308701e+05
## 285    1476.4199 2.309178e+05
## 286    1474.7734 2.305057e+05
## 287    1473.1250 2.304807e+05
## 288    1471.4766 2.295470e+05
## 289    1469.8281 2.288988e+05
## 290    1468.1797 2.289302e+05
## 291    1466.5293 2.293692e+05
## 292    1464.8809 2.291898e+05
## 293    1463.2305 2.283982e+05
## 294    1461.5801 2.287552e+05
## 295    1459.9297 2.277566e+05
## 296    1458.2793 2.279607e+05
## 297    1456.6270 2.270398e+05
## 298    1454.9766 2.273528e+05
## 299    1453.3242 2.272451e+05
## 300    1451.6719 2.267894e+05
## 301    1450.0195 2.258831e+05
## 302    1448.3652 2.259360e+05
## 303    1446.7129 2.249818e+05
## 304    1445.0586 2.254248e+05
## 305    1443.4043 2.257830e+05
## 306    1441.7500 2.241223e+05
## 307    1440.0938 2.246724e+05
## 308    1438.4395 2.244324e+05
## 309    1436.7832 2.240701e+05
## 310    1435.1270 2.238242e+05
## 311    1433.4707 2.231045e+05
## 312    1431.8145 2.229418e+05
## 313    1430.1582 2.228034e+05
## 314    1428.5000 2.230150e+05
## 315    1426.8418 2.223849e+05
## 316    1425.1855 2.225151e+05
## 317    1423.5254 2.225290e+05
## 318    1421.8672 2.217095e+05
## 319    1420.2090 2.221847e+05
## 320    1418.5488 2.219592e+05
## 321    1416.8887 2.215228e+05
## 322    1415.2285 2.208774e+05
## 323    1413.5684 2.214200e+05
## 324    1411.9062 2.206619e+05
## 325    1410.2461 2.211140e+05
## 326    1408.5840 2.205203e+05
## 327    1406.9219 2.196320e+05
## 328    1405.2598 2.196975e+05
## 329    1403.5977 2.194081e+05
## 330    1401.9336 2.198734e+05
## 331    1400.2695 2.194262e+05
## 332    1398.6074 2.189492e+05
## 333    1396.9434 2.190147e+05
## 334    1395.2773 2.191793e+05
## 335    1393.6133 2.185374e+05
## 336    1391.9473 2.183506e+05
## 337    1390.2812 2.179778e+05
## 338    1388.6152 2.184605e+05
## 339    1386.9492 2.176677e+05
## 340    1385.2832 2.178308e+05
## 341    1383.6152 2.179307e+05
## 342    1381.9492 2.172989e+05
## 343    1380.2812 2.178561e+05
## 344    1378.6133 2.167420e+05
## 345    1376.9453 2.176481e+05
## 346    1375.2754 2.167263e+05
## 347    1373.6055 2.165671e+05
## 348    1371.9375 2.169755e+05
## 349    1370.2676 2.165618e+05
## 350    1368.5957 2.167515e+05
## 351    1366.9258 2.164951e+05
## 352    1365.2539 2.155522e+05
## 353    1363.5840 2.157628e+05
## 354    1361.9121 2.159479e+05
## 355    1360.2402 2.152927e+05
## 356    1358.5664 2.151400e+05
## 357    1356.8945 2.148348e+05
## 358    1355.2207 2.154413e+05
## 359    1353.5469 2.150929e+05
## 360    1351.8730 2.137066e+05
## 361    1350.1992 2.142561e+05
## 362    1348.5254 2.134065e+05
## 363    1346.8496 2.129080e+05
## 364    1345.1738 2.140243e+05
## 365    1343.4980 2.122309e+05
## 366    1341.8223 2.127203e+05
## 367    1340.1465 2.121761e+05
## 368    1338.4688 2.113951e+05
## 369    1336.7930 2.110347e+05
## 370    1335.1152 2.113004e+05
## 371    1333.4375 2.102205e+05
## 372    1331.7578 2.099425e+05
## 373    1330.0801 2.091597e+05
## 374    1328.4004 2.094731e+05
## 375    1326.7207 2.092058e+05
## 376    1325.0410 2.083536e+05
## 377    1323.3613 2.082845e+05
## 378    1321.6816 2.077811e+05
## 379    1320.0000 2.078400e+05
## 380    1318.3184 2.072535e+05
## 381    1316.6367 2.062257e+05
## 382    1314.9551 2.059683e+05
## 383    1313.2734 2.053514e+05
## 384    1311.5918 2.052814e+05
## 385    1309.9082 2.042638e+05
## 386    1308.2246 2.039431e+05
## 387    1306.5410 2.032350e+05
## 388    1304.8574 2.027275e+05
## 389    1303.1719 2.018715e+05
## 390    1301.4863 2.016866e+05
## 391    1299.8027 2.011991e+05
## 392    1298.1172 2.002816e+05
## 393    1296.4297 1.992311e+05
## 394    1294.7441 1.998963e+05
## 395    1293.0566 1.994436e+05
## 396    1291.3711 1.985747e+05
## 397    1289.6836 1.971032e+05
## 398    1287.9961 1.972971e+05
## 399    1286.3066 1.961626e+05
## 400    1284.6191 1.956593e+05
## 401    1282.9297 1.957750e+05
## 402    1281.2402 1.947954e+05
## 403    1279.5508 1.944599e+05
## 404    1277.8613 1.938878e+05
## 405    1276.1699 1.926874e+05
## 406    1274.4785 1.925388e+05
## 407    1272.7891 1.921360e+05
## 408    1271.0977 1.916062e+05
## 409    1269.4043 1.906142e+05
## 410    1267.7129 1.904779e+05
## 411    1266.0195 1.890700e+05
## 412    1264.3281 1.886904e+05
## 413    1262.6348 1.880940e+05
## 414    1260.9395 1.881265e+05
## 415    1259.2461 1.876898e+05
## 416    1257.5508 1.872769e+05
## 417    1255.8574 1.861782e+05
## 418    1254.1621 1.869692e+05
## 419    1252.4668 1.866318e+05
## 420    1250.7695 1.850829e+05
## 421    1249.0742 1.846974e+05
## 422    1247.3770 1.842399e+05
## 423    1245.6797 1.835999e+05
## 424    1243.9824 1.834800e+05
## 425    1242.2852 1.834324e+05
## 426    1240.5859 1.826133e+05
## 427    1238.8887 1.819138e+05
## 428    1237.1895 1.815486e+05
## 429    1235.4902 1.814749e+05
## 430    1233.7910 1.809158e+05
## 431    1232.0898 1.805319e+05
## 432    1230.3906 1.796482e+05
## 433    1228.6895 1.794764e+05
## 434    1226.9883 1.794178e+05
## 435    1225.2871 1.783998e+05
## 436    1223.5840 1.787116e+05
## 437    1221.8828 1.787060e+05
## 438    1220.1797 1.776169e+05
## 439    1218.4766 1.773884e+05
## 440    1216.7734 1.769559e+05
## 441    1215.0684 1.765795e+05
## 442    1213.3652 1.760403e+05
## 443    1211.6602 1.757096e+05
## 444    1209.9551 1.753204e+05
## 445    1208.2500 1.751630e+05
## 446    1206.5449 1.754248e+05
## 447    1204.8379 1.745713e+05
## 448    1203.1328 1.740552e+05
## 449    1201.4258 1.733898e+05
## 450    1199.7188 1.728478e+05
## 451    1198.0098 1.727012e+05
## 452    1196.3027 1.719736e+05
## 453    1194.5938 1.721390e+05
## 454    1192.8848 1.712919e+05
## 455    1191.1758 1.717879e+05
## 456    1189.4668 1.707320e+05
## 457    1187.7578 1.708653e+05
## 458    1186.0469 1.704723e+05
## 459    1184.3359 1.695781e+05
## 460    1182.6250 1.700958e+05
## 461    1180.9141 1.692459e+05
## 462    1179.2031 1.687557e+05
## 463    1177.4902 1.686614e+05
## 464    1175.7773 1.682707e+05
## 465    1174.0645 1.684655e+05
## 466    1172.3516 1.669528e+05
## 467    1170.6387 1.668720e+05
## 468    1168.9238 1.670596e+05
## 469    1167.2090 1.662759e+05
## 470    1165.4941 1.659343e+05
## 471    1163.7793 1.656847e+05
## 472    1162.0645 1.650825e+05
## 473    1160.3477 1.645665e+05
## 474    1158.6328 1.641920e+05
## 475    1156.9160 1.639487e+05
## 476    1155.1992 1.633342e+05
## 477    1153.4805 1.629806e+05
## 478    1151.7637 1.629778e+05
## 479    1150.0449 1.619609e+05
## 480    1148.3262 1.616121e+05
## 481    1146.6074 1.617521e+05
## 482    1144.8887 1.613744e+05
## 483    1143.1680 1.600476e+05
## 484    1141.4473 1.601093e+05
## 485    1139.7285 1.602131e+05
## 486    1138.0059 1.591823e+05
## 487    1136.2852 1.594344e+05
## 488    1134.5645 1.583940e+05
## 489    1132.8418 1.578520e+05
## 490    1131.1191 1.578110e+05
## 491    1129.3965 1.571707e+05
## 492    1127.6738 1.573039e+05
## 493    1125.9492 1.565479e+05
## 494    1124.2266 1.568465e+05
## 495    1122.5020 1.565375e+05
## 496    1120.7773 1.557676e+05
## 497    1119.0527 1.550763e+05
## 498    1117.3262 1.555459e+05
## 499    1115.5996 1.547101e+05
## 500    1113.8750 1.548247e+05
## 501    1112.1484 1.543586e+05
## 502    1110.4199 1.543646e+05
## 503    1108.6934 1.535529e+05
## 504    1106.9648 1.535561e+05
## 505    1105.2363 1.529084e+05
## 506    1103.5078 1.524591e+05
## 507    1101.7793 1.527112e+05
## 508    1100.0508 1.522289e+05
## 509    1098.3203 1.526371e+05
## 510    1096.5898 1.521592e+05
## 511    1094.8594 1.512381e+05
## 512    1093.1289 1.506669e+05
## 513    1091.3984 1.506360e+05
## 514    1089.6660 1.504810e+05
## 515    1087.9336 1.504053e+05
## 516    1086.2012 1.500007e+05
## 517    1084.4688 1.497362e+05
## 518    1082.7363 1.492886e+05
## 519    1081.0020 1.489912e+05
## 520    1079.2676 1.483018e+05
## 521    1077.5332 1.486850e+05
## 522    1075.7988 1.486184e+05
## 523    1074.0625 1.476874e+05
## 524    1072.3281 1.480532e+05
## 525    1070.5918 1.472192e+05
## 526    1068.8555 1.467398e+05
## 527    1067.1191 1.467370e+05
## 528    1065.3809 1.467730e+05
## 529    1063.6445 1.461904e+05
## 530    1061.9062 1.462581e+05
## 531    1060.1680 1.460641e+05
## 532    1058.4297 1.449715e+05
## 533    1056.6895 1.455829e+05
## 534    1054.9512 1.449191e+05
## 535    1053.2109 1.443476e+05
## 536    1051.4707 1.438898e+05
## 537    1049.7305 1.434754e+05
## 538    1047.9883 1.435435e+05
## 539    1046.2480 1.429771e+05
## 540    1044.5059 1.434141e+05
## 541    1042.7637 1.428150e+05
## 542    1041.0195 1.420353e+05
## 543    1039.2773 1.417981e+05
## 544    1037.5332 1.419209e+05
## 545    1035.7910 1.415648e+05
## 546    1034.0469 1.412003e+05
## 547    1032.3008 1.400607e+05
## 548    1030.5566 1.402468e+05
## 549    1028.8105 1.401707e+05
## 550    1027.0645 1.397280e+05
## 551    1025.3184 1.392811e+05
## 552    1023.5723 1.394242e+05
## 553    1021.8262 1.385985e+05
## 554    1020.0781 1.383940e+05
## 555    1018.3301 1.381180e+05
## 556    1016.5820 1.378450e+05
## 557    1014.8340 1.374206e+05
## 558    1013.0840 1.371293e+05
## 559    1011.3359 1.369396e+05
## 560    1009.5859 1.365642e+05
## 561    1007.8359 1.363190e+05
## 562    1006.0859 1.366179e+05
## 563    1004.3340 1.365898e+05
## 564    1002.5820 1.361762e+05
## 565    1000.8301 1.356758e+05
## 566     999.0781 1.353111e+05
## 567     997.3262 1.348938e+05
## 568     995.5742 1.352239e+05
## 569     993.8203 1.342564e+05
## 570     992.0664 1.341874e+05
## 571     990.3125 1.342267e+05
## 572     988.5586 1.341278e+05
## 573     986.8027 1.336842e+05
## 574     985.0469 1.333362e+05
## 575     983.2910 1.330552e+05
## 576     981.5352 1.323644e+05
## 577     979.7793 1.332693e+05
## 578     978.0215 1.329174e+05
## 579     976.2656 1.327790e+05
## 580     974.5078 1.328697e+05
## 581     972.7500 1.315937e+05
## 582     970.9902 1.318467e+05
## 583     969.2324 1.313973e+05
## 584     967.4727 1.311514e+05
## 585     965.7129 1.318005e+05
## 586     963.9531 1.314722e+05
## 587     962.1914 1.310418e+05
## 588     960.4316 1.307904e+05
## 589     958.6699 1.303347e+05
## 590     956.9082 1.306129e+05
## 591     955.1465 1.302213e+05
## 592     953.3828 1.297972e+05
## 593     951.6211 1.292897e+05
## 594     949.8574 1.292757e+05
## 595     948.0938 1.294234e+05
## 596     946.3281 1.293456e+05
## 597     944.5645 1.286190e+05
## 598     942.7988 1.284946e+05
## 599     941.0332 1.280149e+05
## 600     939.2676 1.276090e+05
## 601     937.5020 1.280129e+05
## 602     935.7363 1.278152e+05
## 603     933.9688 1.274011e+05
## 604     932.2012 1.274752e+05
## 605     930.4336 1.271038e+05
## 606     928.6660 1.262730e+05
## 607     926.8965 1.268788e+05
## 608     925.1270 1.262137e+05
## 609     923.3574 1.255956e+05
## 610     921.5879 1.254863e+05
## 611     919.8184 1.249519e+05
## 612     918.0469 1.248273e+05
## 613     916.2773 1.245262e+05
## 614     914.5059 1.241660e+05
## 615     912.7324 1.240232e+05
## 616     910.9609 1.237196e+05
## 617     909.1875 1.235488e+05
## 618     907.4160 1.237065e+05
## 619     905.6426 1.231904e+05
## 620     903.8672 1.228802e+05
## 621     902.0938 1.234451e+05
## 622     900.3184 1.232224e+05
## 623     898.5430 1.225138e+05
## 624     896.7676 1.222618e+05
## 625     894.9922 1.223139e+05
## 626     893.2168 1.223617e+05
## 627     891.4395 1.218608e+05
## 628     889.6621 1.217160e+05
## 629     887.8848 1.214390e+05
## 630     886.1074 1.210849e+05
## 631     884.3281 1.212046e+05
## 632     882.5488 1.209139e+05
## 633     880.7695 1.203830e+05
## 634     878.9902 1.203314e+05
## 635     877.2109 1.199020e+05
## 636     875.4297 1.202085e+05
## 637     873.6504 1.195631e+05
## 638     871.8691 1.196492e+05
## 639     870.0859 1.193284e+05
## 640     868.3047 1.195702e+05
## 641     866.5215 1.190952e+05
## 642     864.7383 1.191813e+05
## 643     862.9551 1.190893e+05
## 644     861.1719 1.184577e+05
## 645     859.3887 1.180675e+05
## 646     857.6035 1.175219e+05
## 647     855.8184 1.180872e+05
## 648     854.0332 1.178274e+05
## 649     852.2480 1.172976e+05
## 650     850.4609 1.171068e+05
## 651     848.6738 1.168390e+05
## 652     846.8867 1.169813e+05
## 653     845.0996 1.168885e+05
## 654     843.3125 1.166070e+05
## 655     841.5234 1.163158e+05
## 656     839.7344 1.156012e+05
## 657     837.9453 1.158484e+05
## 658     836.1562 1.157671e+05
## 659     834.3672 1.158227e+05
## 660     832.5762 1.151801e+05
## 661     830.7852 1.154145e+05
## 662     828.9941 1.149076e+05
## 663     827.2031 1.148642e+05
## 664     825.4102 1.145042e+05
## 665     823.6191 1.140760e+05
## 666     821.8262 1.140635e+05
## 667     820.0332 1.146825e+05
## 668     818.2383 1.140496e+05
## 669     816.4453 1.133975e+05
## 670     814.6504 1.136666e+05
## 671     812.8555 1.133366e+05
## 672     811.0605 1.133186e+05
## 673     809.2637 1.130028e+05
## 674     807.4688 1.131018e+05
## 675     805.6719 1.126734e+05
## 676     803.8750 1.125888e+05
## 677     802.0781 1.125933e+05
## 678     800.2793 1.121861e+05
## 679     798.4805 1.121601e+05
## 680     796.6836 1.121618e+05
## 681     794.8828 1.113090e+05
## 682     793.0840 1.117624e+05
## 683     791.2852 1.113697e+05
## 684     789.4844 1.111619e+05
## 685     787.6836 1.105697e+05
## 686     785.8828 1.107536e+05
## 687     784.0801 1.105280e+05
## 688     782.2793 1.103164e+05
## 689     780.4766 1.097512e+05
## 690     778.6738 1.099600e+05
## 691     776.8691 1.099275e+05
## 692     775.0664 1.091811e+05
## 693     773.2617 1.094093e+05
## 694     771.4570 1.093160e+05
## 695     769.6523 1.090551e+05
## 696     767.8477 1.091335e+05
## 697     766.0410 1.088589e+05
## 698     764.2344 1.086495e+05
## 699     762.4277 1.082284e+05
## 700     760.6211 1.081880e+05
## 701     758.8145 1.082126e+05
## 702     757.0059 1.078652e+05
## 703     755.1973 1.082105e+05
## 704     753.3887 1.074099e+05
## 705     751.5801 1.071223e+05
## 706     749.7715 1.076817e+05
## 707     747.9609 1.070738e+05
## 708     746.1504 1.072131e+05
## 709     744.3398 1.067670e+05
## 710     742.5273 1.061141e+05
## 711     740.7168 1.065365e+05
## 712     738.9043 1.059418e+05
## 713     737.0918 1.055585e+05
## 714     735.2793 1.058607e+05
## 715     733.4648 1.054265e+05
## 716     731.6523 1.052379e+05
## 717     729.8379 1.053511e+05
## 718     728.0234 1.046335e+05
## 719     726.2070 1.051628e+05
## 720     724.3926 1.053503e+05
## 721     722.5762 1.050421e+05
## 722     720.7598 1.044051e+05
## 723     718.9434 1.043642e+05
## 724     717.1270 1.041334e+05
## 725     715.3086 1.043195e+05
## 726     713.4902 1.041205e+05
## 727     711.6719 1.036480e+05
## 728     709.8535 1.033901e+05
## 729     708.0332 1.033577e+05
## 730     706.2148 1.035465e+05
## 731     704.3945 1.031171e+05
## 732     702.5723 1.030353e+05
## 733     700.7520 1.029124e+05
## 734     698.9316 1.024697e+05
## 735     697.1094 1.020903e+05
## 736     695.2871 1.027633e+05
## 737     693.4648 1.019205e+05
## 738     691.6406 1.019117e+05
## 739     689.8164 1.016356e+05
## 740     687.9922 1.020710e+05
## 741     686.1680 1.014908e+05
## 742     684.3438 1.009697e+05
## 743     682.5195 1.009680e+05
## 744     680.6934 1.005924e+05
## 745     678.8672 1.007906e+05
## 746     677.0410 1.003811e+05
## 747     675.2129 1.004711e+05
## 748     673.3867 1.005913e+05
## 749     671.5586 9.994129e+04
## 750     669.7305 1.002570e+05
## 751     667.9004 9.984253e+04
## 752     666.0723 9.969477e+04
## 753     664.2422 9.903738e+04
## 754     662.4121 9.909205e+04
## 755     660.5820 9.892405e+04
## 756     658.7520 9.886673e+04
## 757     656.9199 9.866883e+04
## 758     655.0879 9.805336e+04
## 759     653.2559 9.889549e+04
## 760     651.4238 9.878909e+04
## 761     649.5898 9.805945e+04
## 762     647.7578 9.838280e+04
## 763     645.9238 9.787306e+04
## 764     644.0879 9.760752e+04
## 765     642.2539 9.735980e+04
## 766     640.4180 9.741326e+04
## 767     638.5840 9.742446e+04
## 768     636.7480 9.731584e+04
## 769     634.9102 9.668177e+04
## 770     633.0742 9.686189e+04
## 771     631.2363 9.674937e+04
## 772     629.3984 9.667634e+04
## 773     627.5605 9.661966e+04
## 774     625.7227 9.656709e+04
## 775     623.8828 9.616652e+04
## 776     622.0430 9.530811e+04
## 777     620.2031 9.569066e+04
## 778     618.3633 9.583802e+04
## 779     616.5234 9.521931e+04
## 780     614.6816 9.482900e+04
## 781     612.8398 9.488141e+04
## 782     610.9980 9.497994e+04
## 783     609.1562 9.430499e+04
## 784     607.3125 9.429643e+04
## 785     605.4688 9.431092e+04
## 786     603.6250 9.430777e+04
## 787     601.7812 9.335977e+04
## 788     599.9375 9.373902e+04
## 789     598.0918 9.358559e+04
## 790     596.2461 9.318296e+04
## 791     594.4004 9.299722e+04
## 792     592.5527 9.309590e+04
## 793     590.7070 9.291838e+04
## 794     588.8594 9.200334e+04
## 795     587.0117 9.294647e+04
## 796     585.1641 9.239573e+04
## 797     583.3145 9.237539e+04
## 798     581.4668 9.194538e+04
## 799     579.6172 9.204410e+04
## 800     577.7676 9.213196e+04
## 801     575.9160 9.131045e+04
## 802     574.0664 9.111746e+04
## 803     572.2148 9.116359e+04
## 804     570.3633 9.112599e+04
## 805     568.5117 9.115455e+04
## 806     566.6582 9.085379e+04
## 807     564.8066 9.031300e+04
## 808     562.9531 9.111599e+04
## 809     561.0996 9.055651e+04
## 810     559.2441 9.056086e+04
## 811     557.3906 9.058544e+04
## 812     555.5352 9.009923e+04
## 813     553.6797 9.001205e+04
## 814     551.8242 8.986970e+04
## 815     549.9668 8.985802e+04
## 816     548.1094 8.925663e+04
## 817     546.2539 8.972969e+04
## 818     544.3945 8.925914e+04
## 819     542.5371 8.954764e+04
## 820     540.6797 8.909618e+04
## 821     538.8203 8.904299e+04
## 822     536.9609 8.884865e+04
## 823     535.0996 8.824711e+04
## 824     533.2402 8.856371e+04
## 825     531.3789 8.870684e+04
## 826     529.5176 8.844423e+04
## 827     527.6562 8.847451e+04
## 828     525.7949 8.797712e+04
## 829     523.9316 8.769741e+04
## 830     522.0684 8.770770e+04
## 831     520.2051 8.737317e+04
## 832     518.3418 8.711927e+04
## 833     516.4785 8.741531e+04
## 834     514.6133 8.671238e+04
## 835     512.7480 8.663573e+04
## 836     510.8828 8.646398e+04
## 837     509.0156 8.621727e+04
## 838     507.1504 8.646628e+04
## 839     505.2832 8.601346e+04
## 840     503.4160 8.571748e+04
## 841     501.5488 8.566526e+04
## 842     499.6797 8.578969e+04
## 843     497.8105 8.519160e+04
## 844     495.9414 8.527863e+04
## 845     494.0723 8.473577e+04
## 846     492.2031 8.511030e+04
## 847     490.3320 8.495935e+04
## 848     488.4609 8.458530e+04
## 849     486.5898 8.452005e+04
## 850     484.7188 8.465251e+04
## 851     482.8477 8.424140e+04
## 852     480.9746 8.418027e+04
## 853     479.1016 8.418457e+04
## 854     477.2285 8.364841e+04
## 855     475.3535 8.361814e+04
## 856     473.4805 8.328109e+04
## 857     471.6055 8.338027e+04
## 858     469.7305 8.310209e+04
## 859     467.8535 8.331855e+04
## 860     465.9785 8.288727e+04
## 861     464.1016 8.262938e+04
## 862     462.2246 8.227305e+04
## 863     460.3477 8.229373e+04
## 864     458.4688 8.214134e+04
## 865     456.5918 8.235238e+04
## 866     454.7129 8.243955e+04
## 867     452.8340 8.190141e+04
## 868     450.9531 8.170666e+04
## 869     449.0742 8.183515e+04
## 870     447.1934 8.160994e+04
## 871     445.3125 8.094887e+04
## 872     443.4316 8.123423e+04
## 873     441.5488 8.106909e+04
## 874     439.6660 8.093723e+04
## 875     437.7832 8.072576e+04
## 876     435.9004 8.052368e+04
## 877     434.0176 8.011198e+04
## 878     432.1328 8.014234e+04
## 879     430.2480 8.014749e+04
## 880     428.3633 7.998817e+04
## 881     426.4785 7.959952e+04
## 882     424.5938 7.922695e+04
## 883     422.7070 7.925615e+04
## 884     420.8203 7.910248e+04
## 885     418.9336 7.911447e+04
## 886     417.0449 7.857812e+04
## 887     415.1582 7.854521e+04
## 888     413.2695 7.870427e+04
## 889     411.3809 7.829280e+04
## 890     409.4902 7.848360e+04
## 891     407.6016 7.789112e+04
## 892     405.7109 7.763091e+04
## 893     403.8203 7.758768e+04
## 894     401.9297 7.805609e+04
## 895     400.0391 7.749598e+04
## 896     398.1465 7.718852e+04
## 897     396.2539 7.748495e+04
## 898     394.3613 7.688045e+04
## 899     392.4668 7.717285e+04
## 900     390.5742 7.676673e+04
## 901     388.6797 7.687952e+04
## 902     386.7852 7.655679e+04
## 903     384.8906 7.600466e+04
## 904     382.9941 7.637738e+04
## 905     381.0996 7.583477e+04
## 906     379.2031 7.574725e+04
## 907     377.3066 7.576257e+04
## 908     375.4082 7.574495e+04
## 909     373.5117 7.571415e+04
## 910     371.6133 7.538043e+04
## 911     369.7148 7.516143e+04
## 912     367.8145 7.527560e+04
## 913     365.9160 7.499750e+04
## 914     364.0156 7.473268e+04
## 915     362.1152 7.481662e+04
## 916     360.2148 7.469796e+04
## 917     358.3145 7.498830e+04
## 918     356.4121 7.482102e+04
## 919     354.5098 7.476422e+04
## 920     352.6074 7.377053e+04
## 921     350.7051 7.379939e+04
## 922     348.8008 7.355110e+04
## 923     346.8965 7.410525e+04
## 924     344.9922 7.366008e+04
## 925     343.0879 7.368238e+04
## 926     341.1836 7.343827e+04
## 927     339.2773 7.318773e+04
## 928     337.3711 7.339506e+04
## 929     335.4648 7.332036e+04
## 930     333.5586 7.263345e+04
## 931     331.6504 7.260746e+04
## 932     329.7422 7.270334e+04
## 933     327.8340 7.209828e+04
## 934     325.9258 7.243000e+04
## 935     324.0176 7.217492e+04
## 936     322.1074 7.165550e+04
## 937     320.1973 7.174102e+04
## 938     318.2871 7.161059e+04
## 939     316.3750 7.186486e+04
## 940     314.4648 7.133945e+04
## 941     312.5527 7.142235e+04
## 942     310.6406 7.129996e+04
## 943     308.7285 7.125736e+04
## 944     306.8145 7.094559e+04
## 945     304.9004 7.071103e+04
## 946     302.9863 7.024670e+04
## 947     301.0723 7.069539e+04
## 948     299.1582 7.040884e+04
## 949     297.2422 7.043438e+04
## 950     295.3262 7.019370e+04
## 951     293.4102 7.014230e+04
## 952     291.4941 6.994875e+04
## 953     289.5762 6.973573e+04
## 954     287.6582 6.925685e+04
## 955     285.7402 6.939994e+04
## 956     283.8223 6.935660e+04
## 957     281.9043 6.944749e+04
## 958     279.9844 6.890659e+04
## 959     278.0645 6.876574e+04
## 960     276.1445 6.885019e+04
## 961     274.2246 6.858836e+04
## 962     272.3027 6.861816e+04
## 963     270.3809 6.898622e+04
## 964     268.4590 6.829790e+04
## 965     266.5371 6.779455e+04
## 966     264.6133 6.789212e+04
## 967     262.6914 6.742420e+04
## 968     260.7676 6.756080e+04
## 969     258.8438 6.759599e+04
## 970     256.9180 6.738177e+04
## 971     254.9941 6.742348e+04
## 972     253.0684 6.745998e+04
## 973     251.1426 6.677863e+04
## 974     249.2148 6.665045e+04
## 975     247.2891 6.658720e+04
## 976     245.3613 6.675100e+04
## 977     243.4336 6.691861e+04
## 978     241.5059 6.670235e+04
## 979     239.5781 6.600656e+04
## 980     237.6484 6.632975e+04
## 981     235.7188 6.648565e+04
## 982     233.7891 6.619586e+04
## 983     231.8594 6.606162e+04
## 984     229.9277 6.584845e+04
## 985     227.9961 6.565221e+04
## 986     226.0645 6.539912e+04
## 987     224.1328 6.560420e+04
## 988     222.2012 6.533313e+04
## 989     220.2676 6.541009e+04
## 990     218.3340 6.488963e+04
## 991     216.4004 6.490591e+04
## 992     214.4668 6.495966e+04
## 993     212.5312 6.497463e+04
## 994     210.5957 6.462915e+04
## 995     208.6602 6.447629e+04
## 996     206.7246 6.457788e+04
## 997     204.7871 6.420433e+04
## 998     202.8516 6.431497e+04
## 999     200.9141 6.374423e+04
## 1000    198.9766 6.375688e+04
## 1001    197.0371 6.371923e+04
## 1002    195.0996 6.365581e+04
## 1003    193.1602 6.378838e+04
## 1004    191.2207 6.357288e+04
## 1005    189.2812 6.361135e+04
## 1006    187.3398 6.328519e+04
## 1007    185.3984 6.329150e+04
## 1008    183.4570 6.323472e+04
## 1009    181.5156 6.302218e+04
## 1010    179.5742 6.290498e+04
## 1011    177.6309 6.266817e+04
## 1012    175.6875 6.266434e+04
## 1013    173.7441 6.252030e+04
## 1014    171.8008 6.236862e+04
## 1015    169.8574 6.240473e+04
## 1016    167.9121 6.213617e+04
## 1017    165.9668 6.206822e+04
## 1018    164.0215 6.212366e+04
## 1019    162.0742 6.211227e+04
## 1020    160.1289 6.165010e+04
## 1021    158.1816 6.180576e+04
## 1022    156.2344 6.148251e+04
## 1023    154.2852 6.117225e+04
## 1024    152.3379 1.434586e+03
## 1025    150.3887 6.157846e+01
## 1026    148.4395 4.232571e+01
## 1027    146.4902 2.436390e+01
## 1028    144.5391 4.230678e+01
## 1029    142.5898 4.357906e+01
## 1030    140.6387 2.947336e+01
## 1031    138.6875 2.562329e+00
## 
## [[3]]
##      Raman_shift       Counts
## 1      1930.3320 222753.78125
## 2      1928.7832 223002.17188
## 3      1927.2324 223275.45312
## 4      1925.6816 224243.48438
## 5      1924.1309 223036.67188
## 6      1922.5801 223419.37500
## 7      1921.0273 222583.85938
## 8      1919.4746 222280.29688
## 9      1917.9238 222933.48438
## 10     1916.3711 221828.15625
## 11     1914.8164 222205.90625
## 12     1913.2637 221514.85938
## 13     1911.7109 222188.59375
## 14     1910.1562 221388.48438
## 15     1908.6016 221394.50000
## 16     1907.0469 221784.82812
## 17     1905.4922 220859.96875
## 18     1903.9355 221817.60938
## 19     1902.3809 220955.82812
## 20     1900.8242 221074.43750
## 21     1899.2676 221164.07812
## 22     1897.7109 220807.26562
## 23     1896.1543 219519.40625
## 24     1894.5977 219970.51562
## 25     1893.0391 220427.84375
## 26     1891.4805 220410.07812
## 27     1889.9219 219877.39062
## 28     1888.3633 219723.43750
## 29     1886.8047 219513.42188
## 30     1885.2441 219388.48438
## 31     1883.6855 218151.32812
## 32     1882.1250 219419.18750
## 33     1880.5645 218475.73438
## 34     1879.0039 218705.12500
## 35     1877.4414 218449.20312
## 36     1875.8809 218343.90625
## 37     1874.3184 218529.95312
## 38     1872.7559 217712.57812
## 39     1871.1934 217732.31250
## 40     1869.6309 218025.56250
## 41     1868.0664 218026.03125
## 42     1866.5039 216992.04688
## 43     1864.9395 216661.85938
## 44     1863.3750 216434.10938
## 45     1861.8105 217021.34375
## 46     1860.2461 216859.10938
## 47     1858.6797 215777.01562
## 48     1857.1152 216036.68750
## 49     1855.5488 216008.87500
## 50     1853.9824 215570.90625
## 51     1852.4160 216049.07812
## 52     1850.8496 215721.37500
## 53     1849.2812 215108.29688
## 54     1847.7129 214241.93750
## 55     1846.1465 215022.92188
## 56     1844.5781 215059.15625
## 57     1843.0078 214354.34375
## 58     1841.4395 214081.62500
## 59     1839.8711 213777.15625
## 60     1838.3008 214527.14062
## 61     1836.7305 214412.20312
## 62     1835.1602 214236.82812
## 63     1833.5898 213779.81250
## 64     1832.0176 212764.46875
## 65     1830.4473 212580.01562
## 66     1828.8750 213229.10938
## 67     1827.3027 212779.07812
## 68     1825.7305 212281.54688
## 69     1824.1582 212102.12500
## 70     1822.5840 211949.81250
## 71     1821.0117 211049.21875
## 72     1819.4375 210789.18750
## 73     1817.8633 211080.34375
## 74     1816.2891 210685.45312
## 75     1814.7129 209914.51562
## 76     1813.1387 209939.03125
## 77     1811.5625 210293.60938
## 78     1809.9863 209775.48438
## 79     1808.4102 209577.98438
## 80     1806.8340 209356.78125
## 81     1805.2578 209218.10938
## 82     1803.6797 209474.17188
## 83     1802.1016 209326.03125
## 84     1800.5254 207991.25000
## 85     1798.9473 208312.35938
## 86     1797.3672 207955.51562
## 87     1795.7891 208571.01562
## 88     1794.2090 208165.18750
## 89     1792.6309 207675.65625
## 90     1791.0508 208433.21875
## 91     1789.4707 207165.50000
## 92     1787.8887 206799.87500
## 93     1786.3086 206726.93750
## 94     1784.7266 207033.46875
## 95     1783.1445 207115.42188
## 96     1781.5625 206614.20312
## 97     1779.9805 206437.09375
## 98     1778.3984 206585.46875
## 99     1776.8145 206868.01562
## 100    1775.2324 205972.53125
## 101    1773.6484 206019.87500
## 102    1772.0645 206217.12500
## 103    1770.4805 205394.95312
## 104    1768.8945 205469.18750
## 105    1767.3105 205691.67188
## 106    1765.7246 204794.43750
## 107    1764.1387 204711.09375
## 108    1762.5527 205223.60938
## 109    1760.9668 204218.31250
## 110    1759.3789 204059.51562
## 111    1757.7930 204288.29688
## 112    1756.2051 204523.28125
## 113    1754.6172 204156.67188
## 114    1753.0293 204265.62500
## 115    1751.4414 203211.45312
## 116    1749.8516 203910.64062
## 117    1748.2637 203089.81250
## 118    1746.6738 203515.04688
## 119    1745.0840 202851.90625
## 120    1743.4941 202987.71875
## 121    1741.9023 202505.73438
## 122    1740.3125 203125.57812
## 123    1738.7207 202488.21875
## 124    1737.1289 202111.89062
## 125    1735.5371 202194.29688
## 126    1733.9453 201990.89062
## 127    1732.3535 201657.28125
## 128    1730.7598 201722.46875
## 129    1729.1680 201406.31250
## 130    1727.5742 201476.20312
## 131    1725.9805 200427.75000
## 132    1724.3848 200776.95312
## 133    1722.7910 200748.15625
## 134    1721.1953 200443.50000
## 135    1719.6016 200088.82812
## 136    1718.0059 200483.21875
## 137    1716.4082 200034.68750
## 138    1714.8125 200156.40625
## 139    1713.2168 199910.10938
## 140    1711.6191 199479.20312
## 141    1710.0215 200918.79688
## 142    1708.4238 199550.51562
## 143    1706.8262 199410.92188
## 144    1705.2285 198841.25000
## 145    1703.6289 199358.65625
## 146    1702.0312 199422.43750
## 147    1700.4316 198624.89062
## 148    1698.8320 197896.45312
## 149    1697.2305 198540.15625
## 150    1695.6309 197827.64062
## 151    1694.0293 197671.43750
## 152    1692.4297 198121.14062
## 153    1690.8281 197076.64062
## 154    1689.2266 197474.76562
## 155    1687.6230 196977.00000
## 156    1686.0215 197524.73438
## 157    1684.4180 197211.21875
## 158    1682.8164 196568.78125
## 159    1681.2129 196600.17188
## 160    1679.6074 196580.07812
## 161    1678.0039 196973.00000
## 162    1676.4004 196826.62500
## 163    1674.7949 196675.64062
## 164    1673.1895 197361.07812
## 165    1671.5840 196911.04688
## 166    1669.9785 196725.85938
## 167    1668.3730 195818.54688
## 168    1666.7656 196433.53125
## 169    1665.1582 195994.93750
## 170    1663.5508 195996.75000
## 171    1661.9434 196393.54688
## 172    1660.3359 196661.12500
## 173    1658.7285 196096.93750
## 174    1657.1191 196706.35938
## 175    1655.5098 196465.57812
## 176    1653.9004 196148.76562
## 177    1652.2910 196565.18750
## 178    1650.6816 196574.57812
## 179    1649.0723 197416.09375
## 180    1647.4609 196767.15625
## 181    1645.8496 196635.25000
## 182    1644.2383 196964.18750
## 183    1642.6270 197266.62500
## 184    1641.0156 197556.51562
## 185    1639.4023 197357.84375
## 186    1637.7891 198128.12500
## 187    1636.1758 197946.46875
## 188    1634.5625 198119.70312
## 189    1632.9492 198027.95312
## 190    1631.3359 198246.01562
## 191    1629.7207 198510.42188
## 192    1628.1055 198575.00000
## 193    1626.4922 199795.79688
## 194    1624.8750 199199.25000
## 195    1623.2598 199600.89062
## 196    1621.6445 199612.54688
## 197    1620.0273 200315.50000
## 198    1618.4102 200634.68750
## 199    1616.7930 200332.26562
## 200    1615.1758 200711.56250
## 201    1613.5586 200407.68750
## 202    1611.9395 200680.20312
## 203    1610.3223 201437.57812
## 204    1608.7031 202330.53125
## 205    1607.0840 201827.35938
## 206    1605.4629 202420.37500
## 207    1603.8438 201650.39062
## 208    1602.2227 202107.37500
## 209    1600.6035 202670.60938
## 210    1598.9824 202297.40625
## 211    1597.3613 203318.29688
## 212    1595.7383 202152.70312
## 213    1594.1172 202425.62500
## 214    1592.4941 202552.04688
## 215    1590.8711 202270.10938
## 216    1589.2480 202846.26562
## 217    1587.6250 202850.81250
## 218    1586.0020 201683.65625
## 219    1584.3770 202467.34375
## 220    1582.7539 201927.12500
## 221    1581.1289 202044.14062
## 222    1579.5039 201922.65625
## 223    1577.8789 201456.70312
## 224    1576.2520 201679.81250
## 225    1574.6270 201641.48438
## 226    1573.0000 201312.64062
## 227    1571.3730 200867.14062
## 228    1569.7461 201139.31250
## 229    1568.1172 200196.32812
## 230    1566.4902 200239.68750
## 231    1564.8613 199865.37500
## 232    1563.2344 199730.68750
## 233    1561.6055 198995.95312
## 234    1559.9746 198987.31250
## 235    1558.3457 198885.07812
## 236    1556.7148 198942.39062
## 237    1555.0859 198479.82812
## 238    1553.4551 197773.68750
## 239    1551.8242 197405.04688
## 240    1550.1934 197036.56250
## 241    1548.5605 196652.89062
## 242    1546.9277 196241.79688
## 243    1545.2969 196235.18750
## 244    1543.6641 196369.43750
## 245    1542.0312 195698.39062
## 246    1540.3965 195903.07812
## 247    1538.7637 194741.20312
## 248    1537.1289 194274.37500
## 249    1535.4941 194304.82812
## 250    1533.8594 193645.57812
## 251    1532.2246 193322.95312
## 252    1530.5898 193399.42188
## 253    1528.9531 192907.32812
## 254    1527.3164 192644.62500
## 255    1525.6797 192181.90625
## 256    1524.0430 192114.93750
## 257    1522.4062 191828.09375
## 258    1520.7695 191112.39062
## 259    1519.1309 191379.90625
## 260    1517.4922 190296.82812
## 261    1515.8535 190527.76562
## 262    1514.2148 189562.76562
## 263    1512.5762 189177.64062
## 264    1510.9355 189000.01562
## 265    1509.2949 188990.14062
## 266    1507.6543 188651.07812
## 267    1506.0137 188359.37500
## 268    1504.3730 187050.18750
## 269    1502.7324 188420.54688
## 270    1501.0898 187425.54688
## 271    1499.4473 187117.56250
## 272    1497.8047 187010.60938
## 273    1496.1621 186276.71875
## 274    1494.5195 186760.26562
## 275    1492.8750 186201.65625
## 276    1491.2324 187217.23438
## 277    1489.5879 185992.79688
## 278    1487.9434 185997.10938
## 279    1486.2969 185533.31250
## 280    1484.6523 184898.00000
## 281    1483.0059 185690.92188
## 282    1481.3613 184645.76562
## 283    1479.7148 184211.45312
## 284    1478.0664 184023.25000
## 285    1476.4199 184354.20312
## 286    1474.7734 184247.98438
## 287    1473.1250 183833.79688
## 288    1471.4766 183403.09375
## 289    1469.8281 182678.34375
## 290    1468.1797 183783.95312
## 291    1466.5293 183438.39062
## 292    1464.8809 183462.73438
## 293    1463.2305 182349.14062
## 294    1461.5801 182147.98438
## 295    1459.9297 181904.48438
## 296    1458.2793 181850.34375
## 297    1456.6270 181276.95312
## 298    1454.9766 181275.93750
## 299    1453.3242 180568.20312
## 300    1451.6719 181254.18750
## 301    1450.0195 180973.28125
## 302    1448.3652 180247.89062
## 303    1446.7129 180009.64062
## 304    1445.0586 180037.53125
## 305    1443.4043 179722.31250
## 306    1441.7500 179973.85938
## 307    1440.0938 179711.64062
## 308    1438.4395 178905.81250
## 309    1436.7832 179330.96875
## 310    1435.1270 179046.37500
## 311    1433.4707 178675.85938
## 312    1431.8145 178148.54688
## 313    1430.1582 178306.40625
## 314    1428.5000 177984.51562
## 315    1426.8418 178249.39062
## 316    1425.1855 177725.57812
## 317    1423.5254 178652.12500
## 318    1421.8672 177117.15625
## 319    1420.2090 177416.59375
## 320    1418.5488 176717.09375
## 321    1416.8887 176932.10938
## 322    1415.2285 176943.73438
## 323    1413.5684 176265.82812
## 324    1411.9062 176133.06250
## 325    1410.2461 176969.46875
## 326    1408.5840 175599.87500
## 327    1406.9219 175381.56250
## 328    1405.2598 175713.75000
## 329    1403.5977 175152.65625
## 330    1401.9336 175604.98438
## 331    1400.2695 175588.18750
## 332    1398.6074 174790.04688
## 333    1396.9434 175060.32812
## 334    1395.2773 175600.84375
## 335    1393.6133 173519.29688
## 336    1391.9473 174313.57812
## 337    1390.2812 174541.65625
## 338    1388.6152 174005.79688
## 339    1386.9492 173951.75000
## 340    1385.2832 174239.70312
## 341    1383.6152 173215.32812
## 342    1381.9492 173512.28125
## 343    1380.2812 173296.43750
## 344    1378.6133 173314.46875
## 345    1376.9453 172963.87500
## 346    1375.2754 173004.40625
## 347    1373.6055 173257.59375
## 348    1371.9375 172544.82812
## 349    1370.2676 172905.75000
## 350    1368.5957 172558.54688
## 351    1366.9258 172073.79688
## 352    1365.2539 171418.70312
## 353    1363.5840 172023.31250
## 354    1361.9121 171778.21875
## 355    1360.2402 171190.84375
## 356    1358.5664 171247.96875
## 357    1356.8945 171382.76562
## 358    1355.2207 170966.14062
## 359    1353.5469 170714.01562
## 360    1351.8730 170977.23438
## 361    1350.1992 170611.68750
## 362    1348.5254 170047.73438
## 363    1346.8496 170437.75000
## 364    1345.1738 170679.85938
## 365    1343.4980 169582.10938
## 366    1341.8223 169651.25000
## 367    1340.1465 169116.37500
## 368    1338.4688 168077.78125
## 369    1336.7930 168764.26562
## 370    1335.1152 168521.98438
## 371    1333.4375 168022.03125
## 372    1331.7578 167720.39062
## 373    1330.0801 167611.00000
## 374    1328.4004 167317.00000
## 375    1326.7207 167478.64062
## 376    1325.0410 166879.67188
## 377    1323.3613 166463.95312
## 378    1321.6816 166189.73438
## 379    1320.0000 165955.79688
## 380    1318.3184 166480.31250
## 381    1316.6367 165287.43750
## 382    1314.9551 165218.78125
## 383    1313.2734 164696.89062
## 384    1311.5918 164456.01562
## 385    1309.9082 164048.85938
## 386    1308.2246 163580.96875
## 387    1306.5410 163190.48438
## 388    1304.8574 163325.65625
## 389    1303.1719 162721.65625
## 390    1301.4863 162000.67188
## 391    1299.8027 162186.40625
## 392    1298.1172 161083.17188
## 393    1296.4297 160631.37500
## 394    1294.7441 160757.93750
## 395    1293.0566 160762.87500
## 396    1291.3711 160029.84375
## 397    1289.6836 158987.46875
## 398    1287.9961 159438.60938
## 399    1286.3066 158587.82812
## 400    1284.6191 158307.42188
## 401    1282.9297 157967.90625
## 402    1281.2402 157658.12500
## 403    1279.5508 157326.28125
## 404    1277.8613 156927.98438
## 405    1276.1699 156660.00000
## 406    1274.4785 155707.51562
## 407    1272.7891 155416.23438
## 408    1271.0977 154912.23438
## 409    1269.4043 155036.45312
## 410    1267.7129 154972.96875
## 411    1266.0195 153738.23438
## 412    1264.3281 153533.28125
## 413    1262.6348 153132.03125
## 414    1260.9395 152823.95312
## 415    1259.2461 152266.57812
## 416    1257.5508 152699.43750
## 417    1255.8574 151668.81250
## 418    1254.1621 152069.14062
## 419    1252.4668 151419.48438
## 420    1250.7695 151314.03125
## 421    1249.0742 150803.32812
## 422    1247.3770 150151.39062
## 423    1245.6797 149944.59375
## 424    1243.9824 149583.23438
## 425    1242.2852 148789.10938
## 426    1240.5859 149265.79688
## 427    1238.8887 148941.57812
## 428    1237.1895 148279.04688
## 429    1235.4902 148708.40625
## 430    1233.7910 147538.73438
## 431    1232.0898 147832.75000
## 432    1230.3906 147723.78125
## 433    1228.6895 147558.98438
## 434    1226.9883 146875.50000
## 435    1225.2871 146107.06250
## 436    1223.5840 145977.95312
## 437    1221.8828 146408.42188
## 438    1220.1797 145872.54688
## 439    1218.4766 145813.98438
## 440    1216.7734 145538.23438
## 441    1215.0684 145149.59375
## 442    1213.3652 144056.95312
## 443    1211.6602 144306.79688
## 444    1209.9551 143588.71875
## 445    1208.2500 144027.62500
## 446    1206.5449 143696.84375
## 447    1204.8379 143474.62500
## 448    1203.1328 144132.98438
## 449    1201.4258 142815.12500
## 450    1199.7188 142276.90625
## 451    1198.0098 142238.15625
## 452    1196.3027 142689.75000
## 453    1194.5938 142074.31250
## 454    1192.8848 142206.76562
## 455    1191.1758 142208.95312
## 456    1189.4668 141797.26562
## 457    1187.7578 141280.46875
## 458    1186.0469 140778.50000
## 459    1184.3359 139771.06250
## 460    1182.6250 140158.00000
## 461    1180.9141 139751.53125
## 462    1179.2031 139930.89062
## 463    1177.4902 139340.62500
## 464    1175.7773 139190.03125
## 465    1174.0645 138731.53125
## 466    1172.3516 138134.59375
## 467    1170.6387 138187.12500
## 468    1168.9238 138280.43750
## 469    1167.2090 138324.12500
## 470    1165.4941 137471.15625
## 471    1163.7793 138007.65625
## 472    1162.0645 137283.34375
## 473    1160.3477 136984.76562
## 474    1158.6328 136826.15625
## 475    1156.9160 136281.67188
## 476    1155.1992 136014.06250
## 477    1153.4805 135592.25000
## 478    1151.7637 135340.89062
## 479    1150.0449 135109.98438
## 480    1148.3262 135197.76562
## 481    1146.6074 134265.96875
## 482    1144.8887 133842.03125
## 483    1143.1680 133646.51562
## 484    1141.4473 134086.20312
## 485    1139.7285 133706.14062
## 486    1138.0059 133211.46875
## 487    1136.2852 132433.78125
## 488    1134.5645 131797.28125
## 489    1132.8418 132007.43750
## 490    1131.1191 131520.79688
## 491    1129.3965 131373.92188
## 492    1127.6738 131672.48438
## 493    1125.9492 130748.15625
## 494    1124.2266 131252.62500
## 495    1122.5020 130539.00000
## 496    1120.7773 130014.10938
## 497    1119.0527 130014.04688
## 498    1117.3262 129983.54688
## 499    1115.5996 129318.58594
## 500    1113.8750 129631.46094
## 501    1112.1484 129268.00781
## 502    1110.4199 128764.29688
## 503    1108.6934 128907.71094
## 504    1106.9648 128713.91406
## 505    1105.2363 128685.10938
## 506    1103.5078 128411.87500
## 507    1101.7793 128273.22656
## 508    1100.0508 128030.54688
## 509    1098.3203 127305.22656
## 510    1096.5898 127597.48438
## 511    1094.8594 127589.10938
## 512    1093.1289 127569.16406
## 513    1091.3984 126573.07031
## 514    1089.6660 126416.19531
## 515    1087.9336 126296.89844
## 516    1086.2012 126715.89844
## 517    1084.4688 125743.92188
## 518    1082.7363 126034.45312
## 519    1081.0020 125743.69531
## 520    1079.2676 125317.53125
## 521    1077.5332 124900.18750
## 522    1075.7988 124710.71875
## 523    1074.0625 124489.61719
## 524    1072.3281 124437.14062
## 525    1070.5918 124305.46094
## 526    1068.8555 123751.97656
## 527    1067.1191 123905.50000
## 528    1065.3809 124038.80469
## 529    1063.6445 123504.41406
## 530    1061.9062 123246.43750
## 531    1060.1680 123107.94531
## 532    1058.4297 122854.46875
## 533    1056.6895 122671.53125
## 534    1054.9512 122316.19531
## 535    1053.2109 122715.37500
## 536    1051.4707 122278.28906
## 537    1049.7305 121727.92188
## 538    1047.9883 121551.12500
## 539    1046.2480 121426.07031
## 540    1044.5059 121460.38281
## 541    1042.7637 121112.96875
## 542    1041.0195 120676.75781
## 543    1039.2773 120272.28125
## 544    1037.5332 120724.05469
## 545    1035.7910 119803.61719
## 546    1034.0469 119680.50000
## 547    1032.3008 119438.50000
## 548    1030.5566 119268.21875
## 549    1028.8105 119172.49219
## 550    1027.0645 118682.98438
## 551    1025.3184 118243.80469
## 552    1023.5723 118171.23438
## 553    1021.8262 117496.21094
## 554    1020.0781 117967.50000
## 555    1018.3301 117926.47656
## 556    1016.5820 117399.23438
## 557    1014.8340 117429.82031
## 558    1013.0840 117007.25000
## 559    1011.3359 116704.90625
## 560    1009.5859 116468.40625
## 561    1007.8359 116849.10156
## 562    1006.0859 116251.33594
## 563    1004.3340 116156.42188
## 564    1002.5820 116198.57812
## 565    1000.8301 116189.32031
## 566     999.0781 115836.19531
## 567     997.3262 115778.50000
## 568     995.5742 115057.64062
## 569     993.8203 114955.92969
## 570     992.0664 114842.84375
## 571     990.3125 114952.12500
## 572     988.5586 114397.35156
## 573     986.8027 114367.06250
## 574     985.0469 114285.50000
## 575     983.2910 113754.00000
## 576     981.5352 113732.38281
## 577     979.7793 113972.64062
## 578     978.0215 113487.07812
## 579     976.2656 113293.35938
## 580     974.5078 112799.61719
## 581     972.7500 113096.70312
## 582     970.9902 112635.90625
## 583     969.2324 113050.83594
## 584     967.4727 112401.24219
## 585     965.7129 112712.31250
## 586     963.9531 112392.58594
## 587     962.1914 111747.81250
## 588     960.4316 111701.01562
## 589     958.6699 111899.78125
## 590     956.9082 111726.64844
## 591     955.1465 111064.12500
## 592     953.3828 111488.39062
## 593     951.6211 110968.00781
## 594     949.8574 110895.86719
## 595     948.0938 110786.89062
## 596     946.3281 110312.34375
## 597     944.5645 110325.36719
## 598     942.7988 110186.82031
## 599     941.0332 109726.85938
## 600     939.2676 109557.34375
## 601     937.5020 109888.96875
## 602     935.7363 109236.89844
## 603     933.9688 109813.19531
## 604     932.2012 108813.44531
## 605     930.4336 108382.64844
## 606     928.6660 108397.40625
## 607     926.8965 108270.79688
## 608     925.1270 108267.17969
## 609     923.3574 107640.46094
## 610     921.5879 107933.60938
## 611     919.8184 107444.22656
## 612     918.0469 107707.61719
## 613     916.2773 106941.81250
## 614     914.5059 106879.16406
## 615     912.7324 106853.22656
## 616     910.9609 106171.33594
## 617     909.1875 106870.44531
## 618     907.4160 106225.50781
## 619     905.6426 106222.25000
## 620     903.8672 105932.89062
## 621     902.0938 106004.35938
## 622     900.3184 106103.96094
## 623     898.5430 105820.42969
## 624     896.7676 105500.40625
## 625     894.9922 105039.75000
## 626     893.2168 105008.55469
## 627     891.4395 104733.92969
## 628     889.6621 104536.79688
## 629     887.8848 104549.30469
## 630     886.1074 104186.36719
## 631     884.3281 103680.19531
## 632     882.5488 103482.03906
## 633     880.7695 104231.02344
## 634     878.9902 103510.22656
## 635     877.2109 103493.39844
## 636     875.4297 103619.78906
## 637     873.6504 103343.21094
## 638     871.8691 103433.07031
## 639     870.0859 102965.80469
## 640     868.3047 102992.56250
## 641     866.5215 102334.85156
## 642     864.7383 102257.95312
## 643     862.9551 102555.39062
## 644     861.1719 102283.64062
## 645     859.3887 102258.62500
## 646     857.6035 102024.87500
## 647     855.8184 101607.74219
## 648     854.0332 101818.11719
## 649     852.2480 101433.40625
## 650     850.4609 101534.53125
## 651     848.6738 101224.20312
## 652     846.8867 101156.03906
## 653     845.0996 101171.81250
## 654     843.3125 100726.11719
## 655     841.5234 100474.94531
## 656     839.7344 100576.09375
## 657     837.9453 100034.40625
## 658     836.1562  99960.96094
## 659     834.3672  99780.00000
## 660     832.5762 100249.82812
## 661     830.7852 100205.67188
## 662     828.9941  99706.51562
## 663     827.2031  98991.29688
## 664     825.4102  99425.95312
## 665     823.6191  99257.85938
## 666     821.8262  99279.48438
## 667     820.0332  98711.36719
## 668     818.2383  98898.95312
## 669     816.4453  98576.42188
## 670     814.6504  98127.25781
## 671     812.8555  98078.03125
## 672     811.0605  98684.70312
## 673     809.2637  98258.07031
## 674     807.4688  97645.11719
## 675     805.6719  97550.09375
## 676     803.8750  97402.24219
## 677     802.0781  97705.10156
## 678     800.2793  97223.52344
## 679     798.4805  97013.26562
## 680     796.6836  97149.18750
## 681     794.8828  96801.45312
## 682     793.0840  96783.12500
## 683     791.2852  96459.23438
## 684     789.4844  96685.38281
## 685     787.6836  95911.82812
## 686     785.8828  96453.05469
## 687     784.0801  95997.67969
## 688     782.2793  96051.65625
## 689     780.4766  95450.92969
## 690     778.6738  95266.48438
## 691     776.8691  95201.34375
## 692     775.0664  94958.80469
## 693     773.2617  95140.41406
## 694     771.4570  94511.46094
## 695     769.6523  94711.07031
## 696     767.8477  94363.60156
## 697     766.0410  94744.50781
## 698     764.2344  94172.94531
## 699     762.4277  94072.13281
## 700     760.6211  93882.82031
## 701     758.8145  93862.32812
## 702     757.0059  93724.30469
## 703     755.1973  93706.60938
## 704     753.3887  93256.28906
## 705     751.5801  93353.39844
## 706     749.7715  93914.64062
## 707     747.9609  93051.58594
## 708     746.1504  92978.78906
## 709     744.3398  92664.42188
## 710     742.5273  92791.87500
## 711     740.7168  92720.55469
## 712     738.9043  92596.82812
## 713     737.0918  91920.06250
## 714     735.2793  92218.53125
## 715     733.4648  91742.05469
## 716     731.6523  91822.64062
## 717     729.8379  91834.27344
## 718     728.0234  91433.96875
## 719     726.2070  91770.73438
## 720     724.3926  91548.25781
## 721     722.5762  91346.52344
## 722     720.7598  91457.32031
## 723     718.9434  90834.60938
## 724     717.1270  91144.94531
## 725     715.3086  91339.59375
## 726     713.4902  91084.47656
## 727     711.6719  90366.17188
## 728     709.8535  90406.90625
## 729     708.0332  90624.87500
## 730     706.2148  90543.23438
## 731     704.3945  90155.34375
## 732     702.5723  89870.60938
## 733     700.7520  89908.62500
## 734     698.9316  89419.56250
## 735     697.1094  88857.99219
## 736     695.2871  89663.09375
## 737     693.4648  89230.64062
## 738     691.6406  89478.53125
## 739     689.8164  89062.76562
## 740     687.9922  89077.56250
## 741     686.1680  88852.53906
## 742     684.3438  88548.15625
## 743     682.5195  88171.32031
## 744     680.6934  88006.89844
## 745     678.8672  88282.00000
## 746     677.0410  88195.63281
## 747     675.2129  88092.88281
## 748     673.3867  87734.34375
## 749     671.5586  87553.77344
## 750     669.7305  87838.20312
## 751     667.9004  87854.53906
## 752     666.0723  87356.95312
## 753     664.2422  87180.71875
## 754     662.4121  86938.97656
## 755     660.5820  87001.92188
## 756     658.7520  86625.14062
## 757     656.9199  86603.47656
## 758     655.0879  86778.35938
## 759     653.2559  86811.23438
## 760     651.4238  86452.56250
## 761     649.5898  85769.45312
## 762     647.7578  86022.05469
## 763     645.9238  86030.52344
## 764     644.0879  85951.74219
## 765     642.2539  85540.52344
## 766     640.4180  85302.50000
## 767     638.5840  85531.74219
## 768     636.7480  85575.67969
## 769     634.9102  85215.28125
## 770     633.0742  85293.28906
## 771     631.2363  84926.30469
## 772     629.3984  84983.92969
## 773     627.5605  84557.33594
## 774     625.7227  84704.75000
## 775     623.8828  84369.49219
## 776     622.0430  84329.31250
## 777     620.2031  84005.16406
## 778     618.3633  84039.79688
## 779     616.5234  83813.64062
## 780     614.6816  83527.83594
## 781     612.8398  83535.39062
## 782     610.9980  83587.71875
## 783     609.1562  83162.39844
## 784     607.3125  82806.46094
## 785     605.4688  82777.53125
## 786     603.6250  82908.61719
## 787     601.7812  82474.34375
## 788     599.9375  81994.19531
## 789     598.0918  82346.21094
## 790     596.2461  81944.87500
## 791     594.4004  81798.32812
## 792     592.5527  81715.49219
## 793     590.7070  81965.69531
## 794     588.8594  81470.07031
## 795     587.0117  81218.21875
## 796     585.1641  81049.00000
## 797     583.3145  81027.27344
## 798     581.4668  80956.87500
## 799     579.6172  81164.96875
## 800     577.7676  81243.21875
## 801     575.9160  81103.89062
## 802     574.0664  81028.11719
## 803     572.2148  80379.75781
## 804     570.3633  80316.33594
## 805     568.5117  80186.78906
## 806     566.6582  80184.15625
## 807     564.8066  79879.29688
## 808     562.9531  80266.57031
## 809     561.0996  79586.90625
## 810     559.2441  79456.31250
## 811     557.3906  79589.98438
## 812     555.5352  79250.55469
## 813     553.6797  79403.06250
## 814     551.8242  79632.27344
## 815     549.9668  79057.39062
## 816     548.1094  78633.57031
## 817     546.2539  78683.75781
## 818     544.3945  78999.03906
## 819     542.5371  78521.69531
## 820     540.6797  78582.62500
## 821     538.8203  78260.25000
## 822     536.9609  78365.57812
## 823     535.0996  78144.21094
## 824     533.2402  78246.82031
## 825     531.3789  78092.75781
## 826     529.5176  77965.62500
## 827     527.6562  77999.70312
## 828     525.7949  77526.25781
## 829     523.9316  77167.11719
## 830     522.0684  77841.46875
## 831     520.2051  77239.57812
## 832     518.3418  77112.81250
## 833     516.4785  76906.96875
## 834     514.6133  77234.83594
## 835     512.7480  77177.84375
## 836     510.8828  76746.98438
## 837     509.0156  76250.67969
## 838     507.1504  76449.78906
## 839     505.2832  76501.49219
## 840     503.4160  75854.29688
## 841     501.5488  76118.92969
## 842     499.6797  75761.17969
## 843     497.8105  75775.51562
## 844     495.9414  75510.29688
## 845     494.0723  75480.55469
## 846     492.2031  75532.38281
## 847     490.3320  75510.66406
## 848     488.4609  75316.56250
## 849     486.5898  74884.74219
## 850     484.7188  74923.28906
## 851     482.8477  75090.00781
## 852     480.9746  74940.24219
## 853     479.1016  74697.10156
## 854     477.2285  74231.22656
## 855     475.3535  74165.80469
## 856     473.4805  74404.51562
## 857     471.6055  73812.34375
## 858     469.7305  73797.71875
## 859     467.8535  73836.41406
## 860     465.9785  73621.89844
## 861     464.1016  73887.10156
## 862     462.2246  73574.10156
## 863     460.3477  73270.57812
## 864     458.4688  73165.55469
## 865     456.5918  73040.60938
## 866     454.7129  73275.01562
## 867     452.8340  72696.44531
## 868     450.9531  72870.96094
## 869     449.0742  72614.54688
## 870     447.1934  72742.46875
## 871     445.3125  72365.25000
## 872     443.4316  72450.64062
## 873     441.5488  72267.63281
## 874     439.6660  71994.38281
## 875     437.7832  72079.79688
## 876     435.9004  71879.73438
## 877     434.0176  71452.79688
## 878     432.1328  71693.53125
## 879     430.2480  71156.71875
## 880     428.3633  71183.85938
## 881     426.4785  70977.60156
## 882     424.5938  70813.85938
## 883     422.7070  70599.82812
## 884     420.8203  70485.28125
## 885     418.9336  70564.20312
## 886     417.0449  70172.89844
## 887     415.1582  70263.77344
## 888     413.2695  70056.72656
## 889     411.3809  69951.69531
## 890     409.4902  69869.21094
## 891     407.6016  69799.98438
## 892     405.7109  69636.89062
## 893     403.8203  69504.28125
## 894     401.9297  69390.23438
## 895     400.0391  69565.70312
## 896     398.1465  69164.95312
## 897     396.2539  69249.23438
## 898     394.3613  69211.96094
## 899     392.4668  68911.92188
## 900     390.5742  68355.91406
## 901     388.6797  68821.74219
## 902     386.7852  68161.76562
## 903     384.8906  68205.25781
## 904     382.9941  68348.96875
## 905     381.0996  68401.62500
## 906     379.2031  68435.79688
## 907     377.3066  67887.39062
## 908     375.4082  68187.84375
## 909     373.5117  67973.04688
## 910     371.6133  67838.70312
## 911     369.7148  67512.15625
## 912     367.8145  67313.46875
## 913     365.9160  67100.39062
## 914     364.0156  67363.76562
## 915     362.1152  67058.68750
## 916     360.2148  67168.05469
## 917     358.3145  66927.59375
## 918     356.4121  66951.49219
## 919     354.5098  66805.82812
## 920     352.6074  66896.75781
## 921     350.7051  66371.50000
## 922     348.8008  66042.18750
## 923     346.8965  66221.20312
## 924     344.9922  66285.92969
## 925     343.0879  66187.86719
## 926     341.1836  65704.06250
## 927     339.2773  66040.42969
## 928     337.3711  65636.89062
## 929     335.4648  65373.84375
## 930     333.5586  65278.73047
## 931     331.6504  65348.80859
## 932     329.7422  65080.77344
## 933     327.8340  64896.70703
## 934     325.9258  64704.87109
## 935     324.0176  64740.96875
## 936     322.1074  64339.78906
## 937     320.1973  64611.55469
## 938     318.2871  64592.69141
## 939     316.3750  64517.58203
## 940     314.4648  64272.47266
## 941     312.5527  63960.78516
## 942     310.6406  64139.50391
## 943     308.7285  63946.93359
## 944     306.8145  63787.12500
## 945     304.9004  63691.40234
## 946     302.9863  63271.80078
## 947     301.0723  63282.01953
## 948     299.1582  63125.12500
## 949     297.2422  63012.67969
## 950     295.3262  63286.55469
## 951     293.4102  62721.41016
## 952     291.4941  62876.53125
## 953     289.5762  63154.16016
## 954     287.6582  62678.09375
## 955     285.7402  62780.98438
## 956     283.8223  62756.11719
## 957     281.9043  62858.94141
## 958     279.9844  62495.40625
## 959     278.0645  62301.32812
## 960     276.1445  61991.46875
## 961     274.2246  62134.73047
## 962     272.3027  61877.10938
## 963     270.3809  61453.07031
## 964     268.4590  61674.40625
## 965     266.5371  61417.07422
## 966     264.6133  61624.01562
## 967     262.6914  60949.55469
## 968     260.7676  60700.36328
## 969     258.8438  61451.72656
## 970     256.9180  61002.49609
## 971     254.9941  61117.09766
## 972     253.0684  60722.68359
## 973     251.1426  60691.91797
## 974     249.2148  60454.81641
## 975     247.2891  60564.25391
## 976     245.3613  60486.84766
## 977     243.4336  60307.02344
## 978     241.5059  60044.30078
## 979     239.5781  60088.92578
## 980     237.6484  60075.21094
## 981     235.7188  59982.46484
## 982     233.7891  59837.94531
## 983     231.8594  59689.60938
## 984     229.9277  59396.32422
## 985     227.9961  59754.32422
## 986     226.0645  59339.50000
## 987     224.1328  59150.01562
## 988     222.2012  59494.89453
## 989     220.2676  59459.37109
## 990     218.3340  58919.57422
## 991     216.4004  59001.84766
## 992     214.4668  59033.67578
## 993     212.5312  58546.03906
## 994     210.5957  58583.12891
## 995     208.6602  58607.28906
## 996     206.7246  58321.52734
## 997     204.7871  58242.46094
## 998     202.8516  57955.62891
## 999     200.9141  57987.66016
## 1000    198.9766  58011.93750
## 1001    197.0371  57929.15234
## 1002    195.0996  57927.64844
## 1003    193.1602  57706.97656
## 1004    191.2207  57273.72656
## 1005    189.2812  57460.52344
## 1006    187.3398  57514.53516
## 1007    185.3984  57153.76562
## 1008    183.4570  57166.61719
## 1009    181.5156  57312.08203
## 1010    179.5742  57088.05469
## 1011    177.6309  57062.31641
## 1012    175.6875  56682.76562
## 1013    173.7441  56735.60156
## 1014    171.8008  56828.28516
## 1015    169.8574  56351.33594
## 1016    167.9121  56333.51953
## 1017    165.9668  56615.16016
## 1018    164.0215  56142.44531
## 1019    162.0742  56249.30469
## 1020    160.1289  55870.64062
## 1021    158.1816  56086.66406
## 1022    156.2344  55929.01953
## 1023    154.2852  56011.45703
## 1024    152.3379   1319.10071
## 1025    150.3887     50.03250
## 1026    148.4395     32.06493
## 1027    146.4902     24.36390
## 1028    144.5391     25.64047
## 1029    142.5898     30.76169
## 1030    140.6387     32.03627
## 1031    138.6875     11.53048
## 
## [[4]]
##      Raman_shift      Counts
## 1      1930.3320 14582.61133
## 2      1928.7832 14480.99609
## 3      1927.2324 14600.35449
## 4      1925.6816 14500.39844
## 5      1924.1309 14722.86133
## 6      1922.5801 14561.68457
## 7      1921.0273 14550.41797
## 8      1919.4746 14516.60644
## 9      1917.9238 14651.90723
## 10     1916.3711 14519.87207
## 11     1914.8164 14632.57715
## 12     1913.2637 14614.87305
## 13     1911.7109 14487.76269
## 14     1910.1562 14510.31543
## 15     1908.6016 14492.65039
## 16     1907.0469 14526.45019
## 17     1905.4922 14613.28613
## 18     1903.9355 14362.55762
## 19     1902.3809 14595.62207
## 20     1900.8242 14467.10742
## 21     1899.2676 14439.84082
## 22     1897.7109 14427.04004
## 23     1896.1543 14586.03418
## 24     1894.5977 14451.21582
## 25     1893.0391 14513.84668
## 26     1891.4805 14509.06445
## 27     1889.9219 14193.08887
## 28     1888.3633 14510.73438
## 29     1886.8047 14396.92578
## 30     1885.2441 14295.99121
## 31     1883.6855 14283.25000
## 32     1882.1250 14534.90234
## 33     1880.5645 14432.40430
## 34     1879.0039 14461.28516
## 35     1877.4414 14490.15430
## 36     1875.8809 14402.14258
## 37     1874.3184 14338.17773
## 38     1872.7559 14312.64648
## 39     1871.1934 14263.12891
## 40     1869.6309 14466.36328
## 41     1868.0664 14316.08398
## 42     1866.5039 14469.65430
## 43     1864.9395 14372.19141
## 44     1863.3750 14295.54785
## 45     1861.8105 14476.18457
## 46     1860.2461 14284.53516
## 47     1858.6797 14398.01758
## 48     1857.1152 14452.37109
## 49     1855.5488 14275.21973
## 50     1853.9824 14356.70996
## 51     1852.4160 14458.90918
## 52     1850.8496 14269.10938
## 53     1849.2812 14360.11914
## 54     1847.7129 14203.91211
## 55     1846.1465 14234.31055
## 56     1844.5781 14226.44141
## 57     1843.0078 14260.00977
## 58     1841.4395 14231.42578
## 59     1839.8711 14304.80273
## 60     1838.3008 14328.77832
## 61     1836.7305 14233.32227
## 62     1835.1602 14325.75586
## 63     1833.5898 14238.29981
## 64     1832.0176 14354.56055
## 65     1830.4473 14166.91113
## 66     1828.8750 14162.25488
## 67     1827.3027 14241.88281
## 68     1825.7305 14238.80273
## 69     1824.1582 14068.82519
## 70     1822.5840 14100.74707
## 71     1821.0117 14057.97949
## 72     1819.4375 14161.37109
## 73     1817.8633 14045.55469
## 74     1816.2891 14225.11914
## 75     1814.7129 13972.81738
## 76     1813.1387 13857.11621
## 77     1811.5625 14154.02637
## 78     1809.9863 14001.84863
## 79     1808.4102 14244.67285
## 80     1806.8340 14035.45410
## 81     1805.2578 13969.01269
## 82     1803.6797 14181.57031
## 83     1802.1016 13910.69629
## 84     1800.5254 14002.76269
## 85     1798.9473 13979.15430
## 86     1797.3672 13941.30273
## 87     1795.7891 14150.47168
## 88     1794.2090 14156.92383
## 89     1792.6309 14003.52246
## 90     1791.0508 13987.85059
## 91     1789.4707 14060.77832
## 92     1787.8887 14064.08008
## 93     1786.3086 14056.31250
## 94     1784.7266 14005.86133
## 95     1783.1445 14059.75391
## 96     1781.5625 14031.44727
## 97     1779.9805 14090.05078
## 98     1778.3984 14178.64160
## 99     1776.8145 14065.04688
## 100    1775.2324 13997.29102
## 101    1773.6484 14316.31934
## 102    1772.0645 14205.92481
## 103    1770.4805 14300.70703
## 104    1768.8945 14491.68066
## 105    1767.3105 14583.20703
## 106    1765.7246 14658.92383
## 107    1764.1387 14740.91406
## 108    1762.5527 14848.08984
## 109    1760.9668 14956.79394
## 110    1759.3789 15145.80566
## 111    1757.7930 15271.72754
## 112    1756.2051 15292.07812
## 113    1754.6172 15342.33594
## 114    1753.0293 15696.39356
## 115    1751.4414 15722.93457
## 116    1749.8516 15689.66992
## 117    1748.2637 15903.41113
## 118    1746.6738 16027.40820
## 119    1745.0840 16027.12207
## 120    1743.4941 16176.19336
## 121    1741.9023 15954.24512
## 122    1740.3125 16125.26856
## 123    1738.7207 16033.83301
## 124    1737.1289 15845.04394
## 125    1735.5371 15761.55957
## 126    1733.9453 15813.14453
## 127    1732.3535 15552.31055
## 128    1730.7598 15415.57812
## 129    1729.1680 15206.72266
## 130    1727.5742 15241.12402
## 131    1725.9805 15059.05859
## 132    1724.3848 14966.45606
## 133    1722.7910 14644.99121
## 134    1721.1953 14812.71777
## 135    1719.6016 14671.64453
## 136    1718.0059 14364.54883
## 137    1716.4082 14450.76953
## 138    1714.8125 14229.99023
## 139    1713.2168 14338.12402
## 140    1711.6191 14388.28906
## 141    1710.0215 14283.48242
## 142    1708.4238 14192.80469
## 143    1706.8262 14180.38867
## 144    1705.2285 14435.44434
## 145    1703.6289 14232.19727
## 146    1702.0312 14294.82617
## 147    1700.4316 14324.60156
## 148    1698.8320 14493.45410
## 149    1697.2305 14484.11231
## 150    1695.6309 14715.34375
## 151    1694.0293 14929.29590
## 152    1692.4297 15055.71484
## 153    1690.8281 15294.48047
## 154    1689.2266 15534.70508
## 155    1687.6230 16018.25977
## 156    1686.0215 16537.49219
## 157    1684.4180 16487.17188
## 158    1682.8164 16837.65820
## 159    1681.2129 17571.54492
## 160    1679.6074 17630.15234
## 161    1678.0039 18042.50781
## 162    1676.4004 18428.19922
## 163    1674.7949 18863.57617
## 164    1673.1895 18932.75781
## 165    1671.5840 19414.55469
## 166    1669.9785 19488.25977
## 167    1668.3730 19700.45898
## 168    1666.7656 20139.76562
## 169    1665.1582 20133.91992
## 170    1663.5508 20252.51562
## 171    1661.9434 20056.91602
## 172    1660.3359 20195.68750
## 173    1658.7285 20477.41406
## 174    1657.1191 20277.22852
## 175    1655.5098 20448.49414
## 176    1653.9004 20262.37891
## 177    1652.2910 20172.63867
## 178    1650.6816 19971.13086
## 179    1649.0723 20098.84180
## 180    1647.4609 19897.43555
## 181    1645.8496 19770.60352
## 182    1644.2383 19518.15039
## 183    1642.6270 19351.11914
## 184    1641.0156 19103.51367
## 185    1639.4023 18866.86719
## 186    1637.7891 18500.10352
## 187    1636.1758 18384.57422
## 188    1634.5625 17942.13867
## 189    1632.9492 17267.51172
## 190    1631.3359 16780.58398
## 191    1629.7207 16561.76367
## 192    1628.1055 16025.64941
## 193    1626.4922 15656.93457
## 194    1624.8750 15396.70606
## 195    1623.2598 15268.10254
## 196    1621.6445 14788.40625
## 197    1620.0273 14553.27246
## 198    1618.4102 14293.49707
## 199    1616.7930 14146.68457
## 200    1615.1758 14213.22461
## 201    1613.5586 14154.56934
## 202    1611.9395 14077.40039
## 203    1610.3223 13805.64258
## 204    1608.7031 13853.66504
## 205    1607.0840 13968.05566
## 206    1605.4629 13995.95410
## 207    1603.8438 13792.34766
## 208    1602.2227 13821.81348
## 209    1600.6035 13889.83203
## 210    1598.9824 13805.13281
## 211    1597.3613 13466.04394
## 212    1595.7383 13450.84473
## 213    1594.1172 13355.50195
## 214    1592.4941 13388.10059
## 215    1590.8711 13377.54688
## 216    1589.2480 13474.82031
## 217    1587.6250 13337.97070
## 218    1586.0020 13230.43262
## 219    1584.3770 13276.87500
## 220    1582.7539 13306.36719
## 221    1581.1289 13234.29199
## 222    1579.5039 13073.02246
## 223    1577.8789 13251.72656
## 224    1576.2520 13192.00977
## 225    1574.6270 13166.13867
## 226    1573.0000 13301.66992
## 227    1571.3730 13143.62695
## 228    1569.7461 13113.17188
## 229    1568.1172 13007.46191
## 230    1566.4902 13040.01269
## 231    1564.8613 13063.33691
## 232    1563.2344 13198.71191
## 233    1561.6055 13168.27441
## 234    1559.9746 12992.07715
## 235    1558.3457 13085.95801
## 236    1556.7148 13279.49316
## 237    1555.0859 13160.12109
## 238    1553.4551 13163.44922
## 239    1551.8242 13015.02734
## 240    1550.1934 13254.38379
## 241    1548.5605 13024.80078
## 242    1546.9277 13032.74707
## 243    1545.2969 13101.94922
## 244    1543.6641 12909.29102
## 245    1542.0312 13056.56055
## 246    1540.3965 12862.46191
## 247    1538.7637 13073.94629
## 248    1537.1289 13100.22559
## 249    1535.4941 12913.88672
## 250    1533.8594 13057.93652
## 251    1532.2246 13036.80469
## 252    1530.5898 13179.23731
## 253    1528.9531 13170.31250
## 254    1527.3164 13338.62793
## 255    1525.6797 13306.75781
## 256    1524.0430 13323.77246
## 257    1522.4062 13586.61426
## 258    1520.7695 13409.68262
## 259    1519.1309 13629.65625
## 260    1517.4922 13690.83691
## 261    1515.8535 13820.64356
## 262    1514.2148 13817.69238
## 263    1512.5762 14014.51367
## 264    1510.9355 13944.43652
## 265    1509.2949 13863.71777
## 266    1507.6543 14133.55273
## 267    1506.0137 14072.63379
## 268    1504.3730 14034.59082
## 269    1502.7324 14040.73047
## 270    1501.0898 14092.54688
## 271    1499.4473 14253.95215
## 272    1497.8047 14109.35547
## 273    1496.1621 14142.86133
## 274    1494.5195 14190.04394
## 275    1492.8750 14158.11035
## 276    1491.2324 14118.58496
## 277    1489.5879 14050.18750
## 278    1487.9434 14018.30176
## 279    1486.2969 14150.56250
## 280    1484.6523 13890.75000
## 281    1483.0059 13910.56543
## 282    1481.3613 14024.53613
## 283    1479.7148 13975.98144
## 284    1478.0664 13895.56445
## 285    1476.4199 14048.92578
## 286    1474.7734 14004.94629
## 287    1473.1250 14341.79394
## 288    1471.4766 14670.91211
## 289    1469.8281 14722.36523
## 290    1468.1797 15180.13574
## 291    1466.5293 15417.90723
## 292    1464.8809 15972.32519
## 293    1463.2305 16387.10352
## 294    1461.5801 16751.71289
## 295    1459.9297 17094.95898
## 296    1458.2793 17185.17773
## 297    1456.6270 17266.27344
## 298    1454.9766 17109.69922
## 299    1453.3242 16804.89062
## 300    1451.6719 16653.01758
## 301    1450.0195 16434.65234
## 302    1448.3652 16233.01660
## 303    1446.7129 16261.28516
## 304    1445.0586 16094.53809
## 305    1443.4043 16224.08106
## 306    1441.7500 16534.88672
## 307    1440.0938 16777.57812
## 308    1438.4395 16971.83203
## 309    1436.7832 17265.66406
## 310    1435.1270 17363.10742
## 311    1433.4707 17759.36328
## 312    1431.8145 17898.90820
## 313    1430.1582 17710.99805
## 314    1428.5000 18019.43359
## 315    1426.8418 17848.16211
## 316    1425.1855 17931.77734
## 317    1423.5254 17756.07422
## 318    1421.8672 17523.17578
## 319    1420.2090 17572.14453
## 320    1418.5488 17563.84570
## 321    1416.8887 17505.84766
## 322    1415.2285 17484.01172
## 323    1413.5684 17525.41406
## 324    1411.9062 17283.82617
## 325    1410.2461 17668.35547
## 326    1408.5840 17625.43359
## 327    1406.9219 17671.27734
## 328    1405.2598 17634.38672
## 329    1403.5977 17647.12695
## 330    1401.9336 17698.94531
## 331    1400.2695 17884.49609
## 332    1398.6074 18048.93164
## 333    1396.9434 18428.11523
## 334    1395.2773 18921.28125
## 335    1393.6133 19402.21875
## 336    1391.9473 20316.81836
## 337    1390.2812 21210.00781
## 338    1388.6152 22039.78320
## 339    1386.9492 23043.23633
## 340    1385.2832 23708.75586
## 341    1383.6152 24699.41406
## 342    1381.9492 25080.91016
## 343    1380.2812 25520.70312
## 344    1378.6133 26060.71484
## 345    1376.9453 26281.33984
## 346    1375.2754 26290.64258
## 347    1373.6055 26335.88477
## 348    1371.9375 26210.40234
## 349    1370.2676 26134.37305
## 350    1368.5957 25729.09180
## 351    1366.9258 25205.76562
## 352    1365.2539 24597.38672
## 353    1363.5840 23742.46484
## 354    1361.9121 22874.45312
## 355    1360.2402 22000.83203
## 356    1358.5664 21202.32812
## 357    1356.8945 20519.24414
## 358    1355.2207 19915.64453
## 359    1353.5469 19811.24414
## 360    1351.8730 19662.08203
## 361    1350.1992 19601.08203
## 362    1348.5254 19443.07031
## 363    1346.8496 19577.66211
## 364    1345.1738 19185.44336
## 365    1343.4980 18763.55273
## 366    1341.8223 18499.95117
## 367    1340.1465 17938.21289
## 368    1338.4688 17633.15430
## 369    1336.7930 17516.04297
## 370    1335.1152 17425.80469
## 371    1333.4375 17311.76562
## 372    1331.7578 17449.52344
## 373    1330.0801 17280.41992
## 374    1328.4004 17453.85742
## 375    1326.7207 17323.52930
## 376    1325.0410 17441.80859
## 377    1323.3613 17521.34766
## 378    1321.6816 17242.31641
## 379    1320.0000 17254.92773
## 380    1318.3184 17532.22656
## 381    1316.6367 17320.27344
## 382    1314.9551 17237.72656
## 383    1313.2734 17060.10547
## 384    1311.5918 16996.96289
## 385    1309.9082 17110.61133
## 386    1308.2246 17268.76172
## 387    1306.5410 17950.96875
## 388    1304.8574 18566.07617
## 389    1303.1719 19835.41602
## 390    1301.4863 21304.51562
## 391    1299.8027 23664.54688
## 392    1298.1172 26698.38477
## 393    1296.4297 30387.79492
## 394    1294.7441 34040.01172
## 395    1293.0566 38384.30078
## 396    1291.3711 42027.24609
## 397    1289.6836 44834.49219
## 398    1287.9961 47369.44141
## 399    1286.3066 47859.64453
## 400    1284.6191 46700.26562
## 401    1282.9297 45094.35547
## 402    1281.2402 42031.41406
## 403    1279.5508 38764.14062
## 404    1277.8613 34881.43359
## 405    1276.1699 30908.72266
## 406    1274.4785 27209.81641
## 407    1272.7891 24213.24414
## 408    1271.0977 21853.51367
## 409    1269.4043 20258.76562
## 410    1267.7129 19232.01367
## 411    1266.0195 18521.78906
## 412    1264.3281 17904.90625
## 413    1262.6348 17524.50977
## 414    1260.9395 17240.22266
## 415    1259.2461 16948.67969
## 416    1257.5508 16641.03320
## 417    1255.8574 16373.34668
## 418    1254.1621 16121.99805
## 419    1252.4668 15965.12207
## 420    1250.7695 15815.68359
## 421    1249.0742 15498.29785
## 422    1247.3770 15211.99219
## 423    1245.6797 14797.64844
## 424    1243.9824 14545.49512
## 425    1242.2852 14274.30762
## 426    1240.5859 13858.96582
## 427    1238.8887 13543.89062
## 428    1237.1895 13343.73047
## 429    1235.4902 13186.32227
## 430    1233.7910 12943.67090
## 431    1232.0898 12823.18066
## 432    1230.3906 12939.44824
## 433    1228.6895 12632.33203
## 434    1226.9883 12635.43066
## 435    1225.2871 12631.18066
## 436    1223.5840 12380.15039
## 437    1221.8828 12578.62305
## 438    1220.1797 12549.42383
## 439    1218.4766 12611.24902
## 440    1216.7734 12783.11914
## 441    1215.0684 12919.69629
## 442    1213.3652 12897.77734
## 443    1211.6602 12921.33301
## 444    1209.9551 12944.87695
## 445    1208.2500 12886.31250
## 446    1206.5449 12780.87012
## 447    1204.8379 12652.02637
## 448    1203.1328 12426.54590
## 449    1201.4258 12199.69922
## 450    1199.7188 12024.20508
## 451    1198.0098 11979.08984
## 452    1196.3027 11913.50098
## 453    1194.5938 11795.25684
## 454    1192.8848 11826.30078
## 455    1191.1758 12084.06055
## 456    1189.4668 12278.82031
## 457    1187.7578 12347.74805
## 458    1186.0469 12653.45801
## 459    1184.3359 12839.18945
## 460    1182.6250 13284.92481
## 461    1180.9141 13511.33496
## 462    1179.2031 13822.35352
## 463    1177.4902 14193.10156
## 464    1175.7773 14581.20215
## 465    1174.0645 15075.67578
## 466    1172.3516 15416.70996
## 467    1170.6387 15780.93359
## 468    1168.9238 16166.87305
## 469    1167.2090 16643.05078
## 470    1165.4941 16802.64648
## 471    1163.7793 17269.72266
## 472    1162.0645 17528.19922
## 473    1160.3477 17857.94922
## 474    1158.6328 18258.92773
## 475    1156.9160 18361.18164
## 476    1155.1992 18700.71289
## 477    1153.4805 18725.66992
## 478    1151.7637 18849.57617
## 479    1150.0449 18816.28320
## 480    1148.3262 19023.02734
## 481    1146.6074 18947.52930
## 482    1144.8887 18809.54102
## 483    1143.1680 18851.87109
## 484    1141.4473 19293.86719
## 485    1139.7285 19465.39062
## 486    1138.0059 19818.43164
## 487    1136.2852 20105.95312
## 488    1134.5645 20512.41602
## 489    1132.8418 20789.48828
## 490    1131.1191 21233.35156
## 491    1129.3965 21246.02930
## 492    1127.6738 21334.14062
## 493    1125.9492 21407.70508
## 494    1124.2266 21269.51172
## 495    1122.5020 20986.39453
## 496    1120.7773 21003.44922
## 497    1119.0527 20661.09766
## 498    1117.3262 20459.43359
## 499    1115.5996 19921.79883
## 500    1113.8750 19526.32617
## 501    1112.1484 19183.15234
## 502    1110.4199 18702.61133
## 503    1108.6934 18487.12891
## 504    1106.9648 18352.76953
## 505    1105.2363 18163.49609
## 506    1103.5078 17860.05078
## 507    1101.7793 17782.30859
## 508    1100.0508 17873.73633
## 509    1098.3203 17762.77930
## 510    1096.5898 17695.22070
## 511    1094.8594 17938.29102
## 512    1093.1289 17984.82031
## 513    1091.3984 17852.26953
## 514    1089.6660 17960.87305
## 515    1087.9336 17880.34570
## 516    1086.2012 17830.15625
## 517    1084.4688 17738.14844
## 518    1082.7363 17653.39062
## 519    1081.0020 17789.30664
## 520    1079.2676 17567.60742
## 521    1077.5332 17279.70117
## 522    1075.7988 17344.99023
## 523    1074.0625 17070.22656
## 524    1072.3281 17174.42188
## 525    1070.5918 16968.94336
## 526    1068.8555 16822.58594
## 527    1067.1191 16581.28711
## 528    1065.3809 16338.65723
## 529    1063.6445 16113.39941
## 530    1061.9062 15781.79297
## 531    1060.1680 15645.92676
## 532    1058.4297 15377.83691
## 533    1056.6895 15334.12109
## 534    1054.9512 15097.83789
## 535    1053.2109 14837.23242
## 536    1051.4707 14737.63769
## 537    1049.7305 14755.85644
## 538    1047.9883 14558.67969
## 539    1046.2480 14627.17383
## 540    1044.5059 14546.36816
## 541    1042.7637 14561.73828
## 542    1041.0195 14465.20019
## 543    1039.2773 14352.92773
## 544    1037.5332 14144.62793
## 545    1035.7910 14142.86523
## 546    1034.0469 13987.73633
## 547    1032.3008 13808.31641
## 548    1030.5566 13756.48340
## 549    1028.8105 13691.78027
## 550    1027.0645 13468.15234
## 551    1025.3184 13553.86914
## 552    1023.5723 13354.70312
## 553    1021.8262 13197.12695
## 554    1020.0781 13194.13867
## 555    1018.3301 13349.92383
## 556    1016.5820 13285.40625
## 557    1014.8340 13290.97461
## 558    1013.0840 12992.07031
## 559    1011.3359 13159.18750
## 560    1009.5859 13169.06250
## 561    1007.8359 13247.49805
## 562    1006.0859 13404.44336
## 563    1004.3340 13371.41699
## 564    1002.5820 13312.70996
## 565    1000.8301 13228.33984
## 566     999.0781 13094.06738
## 567     997.3262 13099.65234
## 568     995.5742 12981.15527
## 569     993.8203 12814.23047
## 570     992.0664 13099.27734
## 571     990.3125 12848.31152
## 572     988.5586 12819.74219
## 573     986.8027 12484.90234
## 574     985.0469 12506.27441
## 575     983.2910 12436.50391
## 576     981.5352 12533.32519
## 577     979.7793 12275.70703
## 578     978.0215 12127.77051
## 579     976.2656 12099.40137
## 580     974.5078 11991.39551
## 581     972.7500 11765.41309
## 582     970.9902 11680.27637
## 583     969.2324 11548.27246
## 584     967.4727 11504.43066
## 585     965.7129 11382.46973
## 586     963.9531 11318.79883
## 587     962.1914 11239.53418
## 588     960.4316 11103.51660
## 589     958.6699 11232.98535
## 590     956.9082 11036.00977
## 591     955.1465 11104.42578
## 592     953.3828 11140.18652
## 593     951.6211 11295.04883
## 594     949.8574 11162.03418
## 595     948.0938 11325.32324
## 596     946.3281 11536.71777
## 597     944.5645 11525.57910
## 598     942.7988 11377.04785
## 599     941.0332 11572.70508
## 600     939.2676 11664.91699
## 601     937.5020 11810.87402
## 602     935.7363 12084.12891
## 603     933.9688 12236.99512
## 604     932.2012 12395.44824
## 605     930.4336 12676.86231
## 606     928.6660 12792.72363
## 607     926.8965 13253.43652
## 608     925.1270 13431.29199
## 609     923.3574 13822.41211
## 610     921.5879 14048.08008
## 611     919.8184 14169.13672
## 612     918.0469 14236.48340
## 613     916.2773 14483.07129
## 614     914.5059 14544.66602
## 615     912.7324 14380.47852
## 616     910.9609 14295.36133
## 617     909.1875 14555.80664
## 618     907.4160 14646.93262
## 619     905.6426 14608.32617
## 620     903.8672 14769.86231
## 621     902.0938 14783.37695
## 622     900.3184 14815.19629
## 623     898.5430 14728.69629
## 624     896.7676 14650.68359
## 625     894.9922 14602.26660
## 626     893.2168 14708.68457
## 627     891.4395 14581.47852
## 628     889.6621 14983.26562
## 629     887.8848 15110.61426
## 630     886.1074 15724.41309
## 631     884.3281 16035.68652
## 632     882.5488 16511.25195
## 633     880.7695 17247.95117
## 634     878.9902 17779.20898
## 635     877.2109 18567.23828
## 636     875.4297 19170.95898
## 637     873.6504 19958.30273
## 638     871.8691 20637.21094
## 639     870.0859 21315.80273
## 640     868.3047 22149.79688
## 641     866.5215 22723.93555
## 642     864.7383 23275.37305
## 643     862.9551 23961.13281
## 644     861.1719 24823.17383
## 645     859.3887 25237.81445
## 646     857.6035 25890.41992
## 647     855.8184 26416.66797
## 648     854.0332 26253.73438
## 649     852.2480 26510.85938
## 650     850.4609 26047.05469
## 651     848.6738 25472.91797
## 652     846.8867 24553.49609
## 653     845.0996 23525.40039
## 654     843.3125 22500.57617
## 655     841.5234 21170.05859
## 656     839.7344 19925.41406
## 657     837.9453 18749.81250
## 658     836.1562 17630.63672
## 659     834.3672 16574.83008
## 660     832.5762 15790.40820
## 661     830.7852 14824.86035
## 662     828.9941 14129.13769
## 663     827.2031 13359.77832
## 664     825.4102 12861.42285
## 665     823.6191 12472.08984
## 666     821.8262 11903.05176
## 667     820.0332 11224.13965
## 668     818.2383 10903.75000
## 669     816.4453 10608.59082
## 670     814.6504 10299.63477
## 671     812.8555 10014.50098
## 672     811.0605  9789.37500
## 673     809.2637  9581.05957
## 674     807.4688  9411.81250
## 675     805.6719  9266.29883
## 676     803.8750  9112.50488
## 677     802.0781  8996.33594
## 678     800.2793  8953.91992
## 679     798.4805  8930.98731
## 680     796.6836  8799.64941
## 681     794.8828  8743.41016
## 682     793.0840  8670.52539
## 683     791.2852  8724.06934
## 684     789.4844  8751.20312
## 685     787.6836  8388.20703
## 686     785.8828  8576.41211
## 687     784.0801  8511.97266
## 688     782.2793  8597.39648
## 689     780.4766  8506.62695
## 690     778.6738  8467.20703
## 691     776.8691  8524.85156
## 692     775.0664  8606.03223
## 693     773.2617  8734.28809
## 694     771.4570  8771.04688
## 695     769.6523  8954.60742
## 696     767.8477  9237.78516
## 697     766.0410  9224.55859
## 698     764.2344  9488.16113
## 699     762.4277  9533.00098
## 700     760.6211  9446.38769
## 701     758.8145  9380.56250
## 702     757.0059  9573.35644
## 703     755.1973  9531.03223
## 704     753.3887  9456.93750
## 705     751.5801  9536.26269
## 706     749.7715  9470.48828
## 707     747.9609  9472.42383
## 708     746.1504  9374.93359
## 709     744.3398  9390.69434
## 710     742.5273  9363.65918
## 711     740.7168  9277.29883
## 712     738.9043  9455.86426
## 713     737.0918  9489.51953
## 714     735.2793  9523.15820
## 715     733.4648  9713.94629
## 716     731.6523  9616.57422
## 717     729.8379  9712.16699
## 718     728.0234  9787.04981
## 719     726.2070  9907.34961
## 720     724.3926  9896.77344
## 721     722.5762 10028.00391
## 722     720.7598 10232.12109
## 723     718.9434 10363.20996
## 724     717.1270 10558.89648
## 725     715.3086 10786.12695
## 726     713.4902 10958.24512
## 727     711.6719 11073.91602
## 728     709.8535 11555.13965
## 729     708.0332 11639.00977
## 730     706.2148 11970.12793
## 731     704.3945 11961.83496
## 732     702.5723 12038.68262
## 733     700.7520 12030.37598
## 734     698.9316 12038.54199
## 735     697.1094 11967.11523
## 736     695.2871 12021.93555
## 737     693.4648 11661.14160
## 738     691.6406 11559.68359
## 739     689.8164 11482.94824
## 740     687.9922 11314.41699
## 741     686.1680 11155.55566
## 742     684.3438 11065.26562
## 743     682.5195 11072.26367
## 744     680.6934 10991.61914
## 745     678.8672 10811.07519
## 746     677.0410 10978.26074
## 747     675.2129 10860.74805
## 748     673.3867 10778.85742
## 749     671.5586 10742.13965
## 750     669.7305 10888.67188
## 751     667.9004 10797.25977
## 752     666.0723 10969.67676
## 753     664.2422 11065.49121
## 754     662.4121 11240.49609
## 755     660.5820 11482.34180
## 756     658.7520 11511.05762
## 757     656.9199 11662.62402
## 758     655.0879 11627.13379
## 759     653.2559 11848.19141
## 760     651.4238 11856.32812
## 761     649.5898 11961.29590
## 762     647.7578 11944.85644
## 763     645.9238 12085.19727
## 764     644.0879 12346.77246
## 765     642.2539 12444.71094
## 766     640.4180 12561.67383
## 767     638.5840 12609.12207
## 768     636.7480 12732.79785
## 769     634.9102 12894.53320
## 770     633.0742 13102.46582
## 771     631.2363 13186.47754
## 772     629.3984 13056.87012
## 773     627.5605 12999.40527
## 774     625.7227 12876.69922
## 775     623.8828 12797.55078
## 776     622.0430 12631.45703
## 777     620.2031 12521.15039
## 778     618.3633 12534.51367
## 779     616.5234 12204.26074
## 780     614.6816 12189.17676
## 781     612.8398 12168.66894
## 782     610.9980 12201.10059
## 783     609.1562 12096.47266
## 784     607.3125 11983.75293
## 785     605.4688 11814.12500
## 786     603.6250 11929.31641
## 787     601.7812 11674.37598
## 788     599.9375 11483.25293
## 789     598.0918 11414.16504
## 790     596.2461 11420.96875
## 791     594.4004 11376.30371
## 792     592.5527 11198.96680
## 793     590.7070 11261.31543
## 794     588.8594 11247.84473
## 795     587.0117 11302.03223
## 796     585.1641 11237.15430
## 797     583.3145 11269.67871
## 798     581.4668 11166.97754
## 799     579.6172 11511.76465
## 800     577.7676 11418.51367
## 801     575.9160 11482.03906
## 802     574.0664 11619.83008
## 803     572.2148 11835.88477
## 804     570.3633 11852.00879
## 805     568.5117 12085.45508
## 806     566.6582 12415.95996
## 807     564.8066 12479.15820
## 808     562.9531 12410.13086
## 809     561.0996 12249.42969
## 810     559.2441 11975.54688
## 811     557.3906 11914.77246
## 812     555.5352 11759.69043
## 813     553.6797 11535.96484
## 814     551.8242 11426.84180
## 815     549.9668 11193.87109
## 816     548.1094 10981.20606
## 817     546.2539 10741.71777
## 818     544.3945 10556.17285
## 819     542.5371 10218.67871
## 820     540.6797 10010.47461
## 821     538.8203  9826.57422
## 822     536.9609  9591.66894
## 823     535.0996  9551.78125
## 824     533.2402  9478.31348
## 825     531.3789  9519.08301
## 826     529.5176  9339.54102
## 827     527.6562  9423.29688
## 828     525.7949  9472.10449
## 829     523.9316  9354.44434
## 830     522.0684  9524.02246
## 831     520.2051  9623.75391
## 832     518.3418  9510.16406
## 833     516.4785  9639.35352
## 834     514.6133  9616.98144
## 835     512.7480  9498.11035
## 836     510.8828  9422.17676
## 837     509.0156  9361.01660
## 838     507.1504  9192.72754
## 839     505.2832  9356.62500
## 840     503.4160  9258.03418
## 841     501.5488  9188.93750
## 842     499.6797  9263.05957
## 843     497.8105  9275.60449
## 844     495.9414  9195.84961
## 845     494.0723  9316.72168
## 846     492.2031  9440.20996
## 847     490.3320  9375.17481
## 848     488.4609  9328.87891
## 849     486.5898  9332.03613
## 850     484.7188  9419.33984
## 851     482.8477  9425.14453
## 852     480.9746  9348.17188
## 853     479.1016  9374.01074
## 854     477.2285  9458.55273
## 855     475.3535  9453.66797
## 856     473.4805  9430.11231
## 857     471.6055  9529.25000
## 858     469.7305  9527.01758
## 859     467.8535  9676.73438
## 860     465.9785  9721.10840
## 861     464.1016  9858.71875
## 862     462.2246  9945.65039
## 863     460.3477 10084.47461
## 864     458.4688 10165.98731
## 865     456.5918 10357.93457
## 866     454.7129 10379.46289
## 867     452.8340 10495.43848
## 868     450.9531 10531.55371
## 869     449.0742 10755.14941
## 870     447.1934 10647.60644
## 871     445.3125 10813.91699
## 872     443.4316 10743.61621
## 873     441.5488 10666.70606
## 874     439.6660 10593.81641
## 875     437.7832 10697.57129
## 876     435.9004 10550.36231
## 877     434.0176 10539.93164
## 878     432.1328 10504.29394
## 879     430.2480 10554.90430
## 880     428.3633 10590.90234
## 881     426.4785 10389.52148
## 882     424.5938 10314.17871
## 883     422.7070 10270.68066
## 884     420.8203 10243.10449
## 885     418.9336 10373.19238
## 886     417.0449 10483.35156
## 887     415.1582 10349.81055
## 888     413.2695 10397.70117
## 889     411.3809 10514.39453
## 890     409.4902 10451.07129
## 891     407.6016 10467.15332
## 892     405.7109 10557.29590
## 893     403.8203 10451.69141
## 894     401.9297 10461.15234
## 895     400.0391 10493.07715
## 896     398.1465 10338.66894
## 897     396.2539 10416.84473
## 898     394.3613 10209.69531
## 899     392.4668 10208.63574
## 900     390.5742 10051.79688
## 901     388.6797  9997.98047
## 902     386.7852  9772.64551
## 903     384.8906  9753.21973
## 904     382.9941  9545.19336
## 905     381.0996  9473.08301
## 906     379.2031  9499.88184
## 907     377.3066  9446.26758
## 908     375.4082  9421.66797
## 909     373.5117  9341.74902
## 910     371.6133  9256.59863
## 911     369.7148  9411.14453
## 912     367.8145  9326.01758
## 913     365.9160  9275.15137
## 914     364.0156  9348.00000
## 915     362.1152  9265.57812
## 916     360.2148  9252.90332
## 917     358.3145  9290.20312
## 918     356.4121  9422.14062
## 919     354.5098  9373.95019
## 920     352.6074  9450.61719
## 921     350.7051  9338.06934
## 922     348.8008  9473.81348
## 923     346.8965  9336.36328
## 924     344.9922  9238.36133
## 925     343.0879  9271.65723
## 926     341.1836  9324.62012
## 927     339.2773  9237.18457
## 928     337.3711  9385.87988
## 929     335.4648  9280.11133
## 930     333.5586  9363.17773
## 931     331.6504  9461.93262
## 932     329.7422  9568.50488
## 933     327.8340  9597.73242
## 934     325.9258  9645.28418
## 935     324.0176  9738.64453
## 936     322.1074  9588.45508
## 937     320.1973  9717.12500
## 938     318.2871  9742.35938
## 939     316.3750  9966.43945
## 940     314.4648  9909.20117
## 941     312.5527  9963.14258
## 942     310.6406  9975.22266
## 943     308.7285 10004.28906
## 944     306.8145  9900.05273
## 945     304.9004 10019.26856
## 946     302.9863 10052.22363
## 947     301.0723 10198.77344
## 948     299.1582 10132.45019
## 949     297.2422 10329.81934
## 950     295.3262 10404.43066
## 951     293.4102 10557.28809
## 952     291.4941 10488.33496
## 953     289.5762 10424.62891
## 954     287.6582 10659.51367
## 955     285.7402 10749.60644
## 956     283.8223 10781.01562
## 957     281.9043 10803.29004
## 958     279.9844 11071.73828
## 959     278.0645 11119.98144
## 960     276.1445 11351.77930
## 961     274.2246 11457.20996
## 962     272.3027 11385.60644
## 963     270.3809 11524.80957
## 964     268.4590 11762.80566
## 965     266.5371 11949.97559
## 966     264.6133 12109.75586
## 967     262.6914 12308.45898
## 968     260.7676 12607.13867
## 969     258.8438 12704.29394
## 970     256.9180 12965.07617
## 971     254.9941 13115.35254
## 972     253.0684 13610.92871
## 973     251.1426 14067.33594
## 974     249.2148 14337.95117
## 975     247.2891 14808.25684
## 976     245.3613 15319.85840
## 977     243.4336 15536.83008
## 978     241.5059 16159.54004
## 979     239.5781 16271.22168
## 980     237.6484 16630.39062
## 981     235.7188 17147.47266
## 982     233.7891 17300.30664
## 983     231.8594 17455.66211
## 984     229.9277 17515.13086
## 985     227.9961 17625.05859
## 986     226.0645 17281.95508
## 987     224.1328 17393.18164
## 988     222.2012 17543.16797
## 989     220.2676 17749.99219
## 990     218.3340 17736.90430
## 991     216.4004 17987.54883
## 992     214.4668 18147.60547
## 993     212.5312 18298.54492
## 994     210.5957 18541.14062
## 995     208.6602 18777.16797
## 996     206.7246 18692.84766
## 997     204.7871 18755.74023
## 998     202.8516 18587.56836
## 999     200.9141 18403.98828
## 1000    198.9766 18238.55273
## 1001    197.0371 18026.75977
## 1002    195.0996 17735.11133
## 1003    193.1602 17448.75391
## 1004    191.2207 16848.01953
## 1005    189.2812 16975.65430
## 1006    187.3398 16538.92383
## 1007    185.3984 16421.83789
## 1008    183.4570 16307.37988
## 1009    181.5156 16137.61231
## 1010    179.5742 16325.76758
## 1011    177.6309 16295.06152
## 1012    175.6875 16369.87500
## 1013    173.7441 16601.58984
## 1014    171.8008 17035.11133
## 1015    169.8574 17168.85352
## 1016    167.9121 17688.18164
## 1017    165.9668 18193.14062
## 1018    164.0215 18556.53320
## 1019    162.0742 19063.64062
## 1020    160.1289 19886.46484
## 1021    158.1816 20444.41016
## 1022    156.2344 21388.51367
## 1023    154.2852 21834.21289
## 1024    152.3379   546.63123
## 1025    150.3887    30.78923
## 1026    148.4395    33.34753
## 1027    146.4902    17.95235
## 1028    144.5391    39.74273
## 1029    142.5898    21.78953
## 1030    140.6387    25.62901
## 1031    138.6875    21.77980

2 Test plot section 2

2.1 with subsection

Plot spectral analysis

library(ggpubr)

test2plot <- ggplot(data = test2_10_8)+
  geom_path(aes(x = Raman_shift, y = Counts))

testcontrolplot <- ggplot(data = test_control)+
  geom_path(aes(x = Raman_shift, y = Counts))

potplastplot <- ggplot(data = pot_plastic)+
  geom_path(aes(x = Raman_shift, y = Counts))

pot1plastplot <- ggplot(data = pot_plastic1)+
  geom_path(aes(x = Raman_shift, y = Counts))

testcontrolplot

test2plot

ggarrange(test2plot, testcontrolplot, potplastplot, pot1plastplot)

setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/9_18_19_spectral_data/")

#list.files()
#plot for white filter control w/oil
oil_control <- read.delim("renB531_control_w_oil_0__Time_0.txt", header = F, sep = "\t")
colnames(oil_control) <- c("Raman_shift", "Counts")
test_control <- as.data.frame(oil_control)

oilcontrolplot <- ggplot(data = oil_control)+
  geom_path(aes(x = Raman_shift, y = Counts))

oilcontrolplot

#plot of individual microspheres on white filter w/oil
micro_indv <- read.delim("renD6C5_microsphere_ind_0__Time_0.txt", header = F, sep = "\t")
colnames(micro_indv) <- c("Raman_shift", "Counts")
micro_indv <- as.data.frame(micro_indv)
micro_indv_plot <-  ggplot(micro_indv, aes(x = Raman_shift, y = Counts))+
  geom_path()
micro_indv_plot

micro_indv1 <- read.delim("renC2B9_microsphere_ind1_0__Time_0.txt", header = F, sep = "\t")
colnames(micro_indv1) <- c("Raman_shift", "Counts")
micro_indv1 <- as.data.frame(micro_indv1)
micro_indv1_plot <-  ggplot(micro_indv1, aes(x = Raman_shift, y = Counts))+
  geom_path()
micro_indv1_plot

micro_indv2 <- read.delim("ren3CA9_microsphere_ind2_0__Time_0.txt", header = F, sep = "\t")
colnames(micro_indv2) <- c("Raman_shift", "Counts")
micro_indv2 <- as.data.frame(micro_indv2)

micro_indv2_plot <-  ggplot(micro_indv2, aes(x = Raman_shift, y = Counts))+
  geom_path()
micro_indv2_plot

#Now reading and plotting with single function using sourced function
micro_indv3_plot <- Raman_plot_function("ren7832_microsphere_ind3_0__Time_0.txt")
micro_indv3_plot

micro_indv4_plot <- Raman_plot_function("ren3359_microsphere_spec_0__Time_0.txt")
micro_indv4_plot

#Black filter
pot_plastic_st4 <-  Raman_plot_function("renE0D5a_st4_potplastic_0__Time_0.txt")
pot_plastic_st4

#White filter clusters of microspheres


#Plot of all indv microsphere plots
ggarrange(oilcontrolplot, micro_indv_plot, micro_indv2_plot, micro_indv3_plot)

Boilcontrolplot <- Raman_plot_function("renED08Z_blackfilter_control_wOIL_0__Time_0.txt")
Boilcontrolplot

#Black filter plot
ggarrange(Boilcontrolplot, pot_plastic_st4)

setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/9_18_19_spectral_data/")

micro_indv_pic <- readPNG("microsphere_w_scalebar_ind3.PNG")
micro_indv_pic <- as.raster(micro_indv_pic)
plot(micro_indv_pic)

micro_indv1_pic <- read.bmp("microsphere1.bmp")
micro_indv1_pic <- pixmapRGB(micro_indv1_pic)
plot(micro_indv1_pic)

3 Another Subsection

#baselineGUI() need to install gWidgets to use this functionality

str(milk)
## 'data.frame':    45 obs. of  2 variables:
##  $ cow    : num  0 0.25 0.375 0.875 0.5 0.75 0.5 0.125 0 0.125 ...
##  $ spectra: num [1:45, 1:21451] 1029 371 606 368 554 ...
##   ..- attr(*, "dimnames")=List of 2
##   .. ..$ : NULL
##   .. ..$ : chr [1:21451] "4999.94078628963" "5001.55954267662" "5003.17856106153" "5004.79784144435" ...
##  - attr(*, "terms")=Classes 'terms', 'formula'  language cow ~ spectra
##   .. ..- attr(*, "variables")= language list(cow, spectra)
##   .. ..- attr(*, "factors")= int [1:2, 1] 0 1
##   .. .. ..- attr(*, "dimnames")=List of 2
##   .. .. .. ..$ : chr [1:2] "cow" "spectra"
##   .. .. .. ..$ : chr "spectra"
##   .. ..- attr(*, "term.labels")= chr "spectra"
##   .. ..- attr(*, "order")= int 1
##   .. ..- attr(*, "intercept")= int 1
##   .. ..- attr(*, "response")= int 1
##   .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
##   .. ..- attr(*, "predvars")= language list(cow, spectra)
##   .. ..- attr(*, "dataClasses")= Named chr [1:2] "numeric" "nmatrix.21451"
##   .. .. ..- attr(*, "names")= chr [1:2] "cow" "spectra"
#View(milk$spectra[1,,drop = F])

test_control_polymod <-  read.delim("renB232_0__Time_0_test_control.txt", header = F, sep = "\t")

#head(test_control_polymod)

test_control_polymod1 <- t(test_control_polymod)

#View(test_control_polymod1)

colnames(test_control_polymod1) <- test_control_polymod1[1,]
test_control_polymod2 <- test_control_polymod1[-1,]

#View(test_control_polymod2)

test_control_polymod3 <- t(test_control_polymod2)

#View(test_control_polymod3)

test_control_polymod4 <- baseline.modpolyfit(test_control_polymod3, degree = 2)

#View(test_control_polymod4)
#View(test_control_polymod4$baseline)

#View(test_control_polymod4$corrected)

#the plotting works using the S4 type data brom the baseline function
#however, that isn't easy to work with and hard to extract the corrected plot
#I need to figure a way to plot the data to and extract the plot so as to
#compare to the library data.

data(milk)
#The way the functions are used have changed and some arguments are no longer used.
#ANY object using baseline() will be broken and I dont need to fix
#bc.modpolyfit <- baseline.modpolyfit(milk$spectra[1,, drop=FALSE], method='modpolyfit', deg=3)

#plot(bc.modpolyfit)

##View(bc.modpolyfit@baseline)

#test_control_polymod5 <- baseline(test_control_polymod1, method = 'modpolyfit', deg = 3)

#plot(test_control_polymod5)

#test_control_polymod6 <- baseline(test_control_polymod3, method = 'modpolyfit', deg = 6)

#plot(test_control_polymod6)

#plot(test_control_polymod6@spectra)

#View(test_control_polymod6@spectra)

#View(test_control_polymod6@corrected)

#View(test_control_polymod6@baseline)

setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/9_18_19_spectral_data/")

#test_micro_indv_polymod_df <- Raman_df_function("ren3CA9_microsphere_ind2_0__Time_0.txt")

#test_micro_indv_polymod_df_transpose <- t(test_micro_indv_polymod_df)

#colnames(test_micro_indv_polymod_df) <- test_micro_indv_polymod_df[1,]
#test

#class(test_control_polymod6)

#showMethods(class = "baseline")
#method ? plot("baseline")


#test_micro_indv_polymod_df
#baseline can't be converted into data frame so can't use ggplot2

#Three separate packages have baseline corrections using basically the same algorithm
#prospectr::baselines(), Baseline::baseline.modpolyfit(), hyperSpec::spc.fit.poly()
#prospectr is the only one that does it baseline correction differently and not the common way so I will not use that. The hyperSpec is made to be used with hyperspec obj so I will continue with that one. Currently the 
setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/10_17_19_spectral_data/")

Bfilter_sample4_plot <- Raman_plot_function("ren68C2_Bfilter_sample4_fullrange_0__Time_0.txt")

Bfilter_sample4_plot

Bfilter_sample5_plot <- Raman_plot_function("ren41A6_Bfilter_sample5_fullrange_0__Time_0.txt")

Bfilter_sample5_plot

Bfilter_control_plot <- Raman_plot_function("renF6B0_Bfilter_rerun_control_0__Time_0.txt")

Bfilter_control_plot

Baseline package is a bust and difficult to work with with no method for resolving baseline objects…seems like hyperspec has more flexibilty

setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/10_24_19_spectral_data/")

potP14plot <- Raman_plot_function("renEFCC_Bfilter_potP14_0__Time_0.txt")

potP14plot

#baselines <- spc.fit.poly.below(test_control_polymod3)
#need to convert to hyperspec object first

plot(chondro)

#convert to hyperspec object
hyper_test <- as.hyperSpec(test_control_polymod3)

plot(hyper_test)

#Baselines
baselines <-  spc.fit.poly.below(hyper_test, poly.order = 6)
#Plotting baseline corrections
plot(hyper_test-baselines)

#Notes on hyperspec objects and their structure.

S4 objects with an S3 data frame object within it. Assumes that a data frame is providing “meta data” *matrix is assumed to be the spectral data

For my larger data sets I need to form a list with extra data (environmental) and internal matrix with all of the spectra for a given sample. Ideally I would have all spectra for a sample within 1 matrix for identification purposes.

I have created a basic hyperspec with 1 spectra above now… Can I apply baseline corrections into hyper_test data? From there I can do the standard normal variate correction and min-max standardization. Then I could finally take this data to compare to the library.

hyper_baseline_corr <- hyper_test-baselines

plot(hyper_baseline_corr)

#Now that I have baseline corrected data I can normalize and min max standardize

hyper_baseline_corr@data[["spc"]] <- standardNormalVariate(hyper_baseline_corr@data[["spc"]])

hyper_baseline_corr@data[["spc"]] <- (hyper_baseline_corr@data[["spc"]] - min(hyper_baseline_corr@data[["spc"]])) / (max(hyper_baseline_corr@data[["spc"]])-min(hyper_baseline_corr@data[["spc"]]))

plot(hyper_baseline_corr)

In the previous chunk, I was able to baseline correct, standard variate normalize and min-max scale the spectra to be able to compare to a library. Next step is to import the reference library to compare spectra. Then I can do correlations to determine the likely polymer type.

I also need to alter the the original data set to be in the same matter as the reference library. The library is a 1 wavelength step the current data I have approx to a 2 wavelength step between values. Need to use the approxfun() to interpolate on the frequency index they used to have the exact same number of values for the eventual correlation matrix. The frequency goes from 780 min to 1750 max by steps of 1. Need to subset my initial data according to this.

ref_lib <- read.csv("/Users/christophercarnivale/Desktop/Dissertation_data/spectra_db.csv")

str(ref_lib)
## 'data.frame':    451515 obs. of  8 variables:
##  $ X        : int  1262413 1262513 1262613 1262713 1262813 1262913 1263013 1263113 1263213 1263313 ...
##  $ ID       : chr  "ABS 1" "ABS 1" "ABS 1" "ABS 1" ...
##  $ SAMPLE   : chr  "ABS" "ABS" "ABS" "ABS" ...
##  $ INTENSITY: num  0.119 0.114 0.11 0.113 0.109 ...
##  $ WAVE     : int  780 781 782 783 784 785 786 787 788 789 ...
##  $ PARTICLE : chr  "1" "1" "1" "1" ...
##  $ SOURCE   : chr  "plastic" "plastic" "plastic" "plastic" ...
##  $ poly_lab : chr  "ABS" "ABS" "ABS" "ABS" ...
plastic_ref_lib <- ref_lib %>% 
  dplyr::filter(SOURCE == "plastic")

#create aprrox wavelength from particle data to get the same number of data
#points for a correlation analysis

freq_index <- seq(780, 1750, by = 1)

plastic_approx_fun <- approxfun(x = hyper_baseline_corr@wavelength, hyper_baseline_corr@data[["spc"]])
#test approx
plastic_approx <- plastic_approx_fun(freq_index)

cbind(freq_index, plastic_approx)
##        freq_index plastic_approx
##   [1,]        780   0.0072165391
##   [2,]        781   0.0065858939
##   [3,]        782   0.0065644072
##   [4,]        783   0.0068442473
##   [5,]        784   0.0072408617
##   [6,]        785   0.0070251642
##   [7,]        786   0.0068388549
##   [8,]        787   0.0072754733
##   [9,]        788   0.0075854061
##  [10,]        789   0.0076216350
##  [11,]        790   0.0077366558
##  [12,]        791   0.0079256932
##  [13,]        792   0.0085413678
##  [14,]        793   0.0093272308
##  [15,]        794   0.0107410908
##  [16,]        795   0.0120459996
##  [17,]        796   0.0120963881
##  [18,]        797   0.0126662281
##  [19,]        798   0.0143583412
##  [20,]        799   0.0150228073
##  [21,]        800   0.0147368923
##  [22,]        801   0.0166086599
##  [23,]        802   0.0193166032
##  [24,]        803   0.0189128285
##  [25,]        804   0.0184728911
##  [26,]        805   0.0196257495
##  [27,]        806   0.0210115732
##  [28,]        807   0.0228744213
##  [29,]        808   0.0256721762
##  [30,]        809   0.0292948487
##  [31,]        810   0.0333401026
##  [32,]        811   0.0375366789
##  [33,]        812   0.0388921344
##  [34,]        813   0.0405214952
##  [35,]        814   0.0448558852
##  [36,]        815   0.0496888982
##  [37,]        816   0.0554495188
##  [38,]        817   0.0609914138
##  [39,]        818   0.0663577118
##  [40,]        819   0.0713293429
##  [41,]        820   0.0761775143
##  [42,]        821   0.0849160360
##  [43,]        822   0.0936216816
##  [44,]        823   0.1015360616
##  [45,]        824   0.1091735488
##  [46,]        825   0.1163609069
##  [47,]        826   0.1247434476
##  [48,]        827   0.1339570746
##  [49,]        828   0.1451415831
##  [50,]        829   0.1568404234
##  [51,]        830   0.1705669387
##  [52,]        831   0.1837704138
##  [53,]        832   0.1950624172
##  [54,]        833   0.2080540267
##  [55,]        834   0.2233561618
##  [56,]        835   0.2401616882
##  [57,]        836   0.2578395547
##  [58,]        837   0.2731775184
##  [59,]        838   0.2884258066
##  [60,]        839   0.3096142115
##  [61,]        840   0.3291962795
##  [62,]        841   0.3443372985
##  [63,]        842   0.3638000511
##  [64,]        843   0.3880096355
##  [65,]        844   0.4065765197
##  [66,]        845   0.4225785401
##  [67,]        846   0.4372506776
##  [68,]        847   0.4520741462
##  [69,]        848   0.4692337962
##  [70,]        849   0.4837267607
##  [71,]        850   0.4927107073
##  [72,]        851   0.4968237900
##  [73,]        852   0.4967719227
##  [74,]        853   0.4982258269
##  [75,]        854   0.5001764406
##  [76,]        855   0.4975764567
##  [77,]        856   0.4943328416
##  [78,]        857   0.4888935429
##  [79,]        858   0.4827113348
##  [80,]        859   0.4753982924
##  [81,]        860   0.4662572300
##  [82,]        861   0.4559539433
##  [83,]        862   0.4446179268
##  [84,]        863   0.4330297593
##  [85,]        864   0.4206377020
##  [86,]        865   0.4081079506
##  [87,]        866   0.3951897788
##  [88,]        867   0.3848613242
##  [89,]        868   0.3773551287
##  [90,]        869   0.3651867898
##  [91,]        870   0.3509754843
##  [92,]        871   0.3387120805
##  [93,]        872   0.3270258951
##  [94,]        873   0.3179571226
##  [95,]        874   0.3070617927
##  [96,]        875   0.2927684484
##  [97,]        876   0.2819255675
##  [98,]        877   0.2736823561
##  [99,]        878   0.2622456065
## [100,]        879   0.2499893815
## [101,]        880   0.2412054837
## [102,]        881   0.2317411677
## [103,]        882   0.2200049503
## [104,]        883   0.2092070991
## [105,]        884   0.1995507233
## [106,]        885   0.1904241037
## [107,]        886   0.1815562022
## [108,]        887   0.1772974269
## [109,]        888   0.1733600782
## [110,]        889   0.1676315847
## [111,]        890   0.1631764030
## [112,]        891   0.1612163193
## [113,]        892   0.1589367497
## [114,]        893   0.1564067121
## [115,]        894   0.1559942127
## [116,]        895   0.1561472320
## [117,]        896   0.1536796561
## [118,]        897   0.1525293073
## [119,]        898   0.1557291254
## [120,]        899   0.1568372267
## [121,]        900   0.1554602944
## [122,]        901   0.1559767148
## [123,]        902   0.1573774216
## [124,]        903   0.1566299781
## [125,]        904   0.1557147472
## [126,]        905   0.1551549473
## [127,]        906   0.1540074548
## [128,]        907   0.1518034008
## [129,]        908   0.1492501929
## [130,]        909   0.1464482561
## [131,]        910   0.1461697740
## [132,]        911   0.1464075550
## [133,]        912   0.1450199292
## [134,]        913   0.1443595946
## [135,]        914   0.1456900219
## [136,]        915   0.1444672248
## [137,]        916   0.1406306566
## [138,]        917   0.1379149864
## [139,]        918   0.1356294991
## [140,]        919   0.1345441604
## [141,]        920   0.1336839951
## [142,]        921   0.1335723950
## [143,]        922   0.1307122744
## [144,]        923   0.1239312723
## [145,]        924   0.1184736475
## [146,]        925   0.1137521266
## [147,]        926   0.1087081087
## [148,]        927   0.1035100887
## [149,]        928   0.0973844886
## [150,]        929   0.0925211436
## [151,]        930   0.0901749313
## [152,]        931   0.0856162674
## [153,]        932   0.0793639319
## [154,]        933   0.0748158585
## [155,]        934   0.0707845170
## [156,]        935   0.0694669426
## [157,]        936   0.0674814586
## [158,]        937   0.0636307769
## [159,]        938   0.0608795308
## [160,]        939   0.0592363430
## [161,]        940   0.0556871718
## [162,]        941   0.0514416817
## [163,]        942   0.0504443149
## [164,]        943   0.0496649481
## [165,]        944   0.0493082751
## [166,]        945   0.0487605864
## [167,]        946   0.0479653484
## [168,]        947   0.0468915133
## [169,]        948   0.0456816192
## [170,]        949   0.0450556849
## [171,]        950   0.0445756616
## [172,]        951   0.0446098186
## [173,]        952   0.0423500285
## [174,]        953   0.0363300532
## [175,]        954   0.0361547053
## [176,]        955   0.0396045138
## [177,]        956   0.0397836004
## [178,]        957   0.0393610047
## [179,]        958   0.0385392290
## [180,]        959   0.0374424953
## [181,]        960   0.0357877103
## [182,]        961   0.0355138507
## [183,]        962   0.0362887368
## [184,]        963   0.0366513796
## [185,]        964   0.0370240065
## [186,]        965   0.0395838515
## [187,]        966   0.0409862394
## [188,]        967   0.0395146641
## [189,]        968   0.0410501097
## [190,]        969   0.0452807344
## [191,]        970   0.0466481834
## [192,]        971   0.0471590796
## [193,]        972   0.0487259634
## [194,]        973   0.0506709740
## [195,]        974   0.0537503652
## [196,]        975   0.0561788854
## [197,]        976   0.0579358707
## [198,]        977   0.0603443950
## [199,]        978   0.0629885824
## [200,]        979   0.0638345612
## [201,]        980   0.0648674493
## [202,]        981   0.0666997157
## [203,]        982   0.0683702311
## [204,]        983   0.0698545290
## [205,]        984   0.0696394182
## [206,]        985   0.0687267527
## [207,]        986   0.0728300661
## [208,]        987   0.0760318712
## [209,]        988   0.0745613265
## [210,]        989   0.0743563339
## [211,]        990   0.0757528823
## [212,]        991   0.0777916826
## [213,]        992   0.0801224156
## [214,]        993   0.0802107946
## [215,]        994   0.0799761939
## [216,]        995   0.0789952577
## [217,]        996   0.0788996112
## [218,]        997   0.0799978887
## [219,]        998   0.0809865614
## [220,]        999   0.0819221792
## [221,]       1000   0.0845830035
## [222,]       1001   0.0866512065
## [223,]       1002   0.0851102084
## [224,]       1003   0.0852018891
## [225,]       1004   0.0875671108
## [226,]       1005   0.0874090490
## [227,]       1006   0.0859856478
## [228,]       1007   0.0862527769
## [229,]       1008   0.0862791434
## [230,]       1009   0.0842689245
## [231,]       1010   0.0821130112
## [232,]       1011   0.0797509260
## [233,]       1012   0.0781195306
## [234,]       1013   0.0768577791
## [235,]       1014   0.0772940352
## [236,]       1015   0.0781786565
## [237,]       1016   0.0805335856
## [238,]       1017   0.0812204354
## [239,]       1018   0.0795844480
## [240,]       1019   0.0788297321
## [241,]       1020   0.0785092283
## [242,]       1021   0.0776910627
## [243,]       1022   0.0773664470
## [244,]       1023   0.0795880301
## [245,]       1024   0.0821022913
## [246,]       1025   0.0850081269
## [247,]       1026   0.0857653230
## [248,]       1027   0.0855190015
## [249,]       1028   0.0875200530
## [250,]       1029   0.0896673517
## [251,]       1030   0.0917779342
## [252,]       1031   0.0936395626
## [253,]       1032   0.0951886270
## [254,]       1033   0.0972809814
## [255,]       1034   0.0996070412
## [256,]       1035   0.1028146600
## [257,]       1036   0.1052276533
## [258,]       1037   0.1044688430
## [259,]       1038   0.1049335069
## [260,]       1039   0.1067956950
## [261,]       1040   0.1088316668
## [262,]       1041   0.1109343341
## [263,]       1042   0.1097717733
## [264,]       1043   0.1092033888
## [265,]       1044   0.1107652121
## [266,]       1045   0.1118837610
## [267,]       1046   0.1125485235
## [268,]       1047   0.1127341906
## [269,]       1048   0.1127368702
## [270,]       1049   0.1106356398
## [271,]       1050   0.1106412657
## [272,]       1051   0.1163567845
## [273,]       1052   0.1191264517
## [274,]       1053   0.1192763778
## [275,]       1054   0.1189595716
## [276,]       1055   0.1187023028
## [277,]       1056   0.1220353574
## [278,]       1057   0.1260233913
## [279,]       1058   0.1314655610
## [280,]       1059   0.1357757727
## [281,]       1060   0.1392331376
## [282,]       1061   0.1426136542
## [283,]       1062   0.1457272216
## [284,]       1063   0.1464102489
## [285,]       1064   0.1483287756
## [286,]       1065   0.1524874909
## [287,]       1066   0.1566744303
## [288,]       1067   0.1608787313
## [289,]       1068   0.1630984595
## [290,]       1069   0.1650156485
## [291,]       1070   0.1667309140
## [292,]       1071   0.1682331329
## [293,]       1072   0.1694264851
## [294,]       1073   0.1728808212
## [295,]       1074   0.1774393586
## [296,]       1075   0.1773506444
## [297,]       1076   0.1773265790
## [298,]       1077   0.1787894682
## [299,]       1078   0.1799636449
## [300,]       1079   0.1808080372
## [301,]       1080   0.1825624944
## [302,]       1081   0.1846494284
## [303,]       1082   0.1905264108
## [304,]       1083   0.1941259132
## [305,]       1084   0.1913446343
## [306,]       1085   0.1908876052
## [307,]       1086   0.1924813848
## [308,]       1087   0.1945160702
## [309,]       1088   0.1964935765
## [310,]       1089   0.1961061799
## [311,]       1090   0.1956312658
## [312,]       1091   0.1949818281
## [313,]       1092   0.1925745744
## [314,]       1093   0.1890030506
## [315,]       1094   0.1908372113
## [316,]       1095   0.1924066484
## [317,]       1096   0.1874697926
## [318,]       1097   0.1850004649
## [319,]       1098   0.1860796813
## [320,]       1099   0.1870949228
## [321,]       1100   0.1880800153
## [322,]       1101   0.1881564709
## [323,]       1102   0.1885026338
## [324,]       1103   0.1899727676
## [325,]       1104   0.1903443639
## [326,]       1105   0.1895825462
## [327,]       1106   0.1942708574
## [328,]       1107   0.2005487721
## [329,]       1108   0.2041643334
## [330,]       1109   0.2086454701
## [331,]       1110   0.2150837960
## [332,]       1111   0.2191214937
## [333,]       1112   0.2214213619
## [334,]       1113   0.2286459544
## [335,]       1114   0.2363119227
## [336,]       1115   0.2410584309
## [337,]       1116   0.2456787378
## [338,]       1117   0.2501100507
## [339,]       1118   0.2593811178
## [340,]       1119   0.2709949079
## [341,]       1120   0.2720474299
## [342,]       1121   0.2733988287
## [343,]       1122   0.2778463205
## [344,]       1123   0.2816704730
## [345,]       1124   0.2848663977
## [346,]       1125   0.2871516321
## [347,]       1126   0.2886355050
## [348,]       1127   0.2801265548
## [349,]       1128   0.2752808119
## [350,]       1129   0.2780027684
## [351,]       1130   0.2775008498
## [352,]       1131   0.2748809842
## [353,]       1132   0.2721974269
## [354,]       1133   0.2688546170
## [355,]       1134   0.2620497681
## [356,]       1135   0.2565388534
## [357,]       1136   0.2527048300
## [358,]       1137   0.2462203160
## [359,]       1138   0.2386785036
## [360,]       1139   0.2314078841
## [361,]       1140   0.2243053300
## [362,]       1141   0.2176494840
## [363,]       1142   0.2153930647
## [364,]       1143   0.2166966109
## [365,]       1144   0.2144098361
## [366,]       1145   0.2117980784
## [367,]       1146   0.2123779106
## [368,]       1147   0.2120238504
## [369,]       1148   0.2102248116
## [370,]       1149   0.2089829139
## [371,]       1150   0.2080107049
## [372,]       1151   0.2050433638
## [373,]       1152   0.2025910790
## [374,]       1153   0.2021063889
## [375,]       1154   0.2017994085
## [376,]       1155   0.2016567763
## [377,]       1156   0.1971286395
## [378,]       1157   0.1915441586
## [379,]       1158   0.1863379939
## [380,]       1159   0.1814428256
## [381,]       1160   0.1770836310
## [382,]       1161   0.1736967812
## [383,]       1162   0.1708281264
## [384,]       1163   0.1627529877
## [385,]       1164   0.1558212369
## [386,]       1165   0.1541932955
## [387,]       1166   0.1481456841
## [388,]       1167   0.1377807824
## [389,]       1168   0.1301942236
## [390,]       1169   0.1234215593
## [391,]       1170   0.1176175090
## [392,]       1171   0.1111393142
## [393,]       1172   0.1034695228
## [394,]       1173   0.0988116719
## [395,]       1174   0.0957868043
## [396,]       1175   0.0869950050
## [397,]       1176   0.0786388586
## [398,]       1177   0.0731907568
## [399,]       1178   0.0688775028
## [400,]       1179   0.0656556141
## [401,]       1180   0.0577637309
## [402,]       1181   0.0488518683
## [403,]       1182   0.0417525743
## [404,]       1183   0.0356548365
## [405,]       1184   0.0312263589
## [406,]       1185   0.0247131905
## [407,]       1186   0.0171454114
## [408,]       1187   0.0146957714
## [409,]       1188   0.0119977503
## [410,]       1189   0.0077349185
## [411,]       1190   0.0053843938
## [412,]       1191   0.0047080144
## [413,]       1192   0.0031415477
## [414,]       1193   0.0015042958
## [415,]       1194   0.0007810596
## [416,]       1195   0.0002680486
## [417,]       1196   0.0000622901
## [418,]       1197   0.0005955999
## [419,]       1198   0.0014497932
## [420,]       1199   0.0050323977
## [421,]       1200   0.0081037395
## [422,]       1201   0.0097997554
## [423,]       1202   0.0134773714
## [424,]       1203   0.0186243355
## [425,]       1204   0.0202503996
## [426,]       1205   0.0215250958
## [427,]       1206   0.0237708397
## [428,]       1207   0.0254013077
## [429,]       1208   0.0262950285
## [430,]       1209   0.0252649387
## [431,]       1210   0.0237278110
## [432,]       1211   0.0250445725
## [433,]       1212   0.0267145255
## [434,]       1213   0.0290705624
## [435,]       1214   0.0287616734
## [436,]       1215   0.0269194295
## [437,]       1216   0.0246653948
## [438,]       1217   0.0225712714
## [439,]       1218   0.0211262026
## [440,]       1219   0.0179460311
## [441,]       1220   0.0131861363
## [442,]       1221   0.0141916649
## [443,]       1222   0.0159669864
## [444,]       1223   0.0140275005
## [445,]       1224   0.0125629950
## [446,]       1225   0.0117652450
## [447,]       1226   0.0110738195
## [448,]       1227   0.0104240672
## [449,]       1228   0.0096775099
## [450,]       1229   0.0113270197
## [451,]       1230   0.0182960967
## [452,]       1231   0.0220185922
## [453,]       1232   0.0236599456
## [454,]       1233   0.0254369951
## [455,]       1234   0.0276801937
## [456,]       1235   0.0316370919
## [457,]       1236   0.0353802361
## [458,]       1237   0.0389178162
## [459,]       1238   0.0425586196
## [460,]       1239   0.0461384606
## [461,]       1240   0.0490390790
## [462,]       1241   0.0523822397
## [463,]       1242   0.0563516410
## [464,]       1243   0.0608608120
## [465,]       1244   0.0656339697
## [466,]       1245   0.0731271910
## [467,]       1246   0.0796402441
## [468,]       1247   0.0840734231
## [469,]       1248   0.0901857243
## [470,]       1249   0.0973139201
## [471,]       1250   0.0997638670
## [472,]       1251   0.1024650794
## [473,]       1252   0.1072575480
## [474,]       1253   0.1110564579
## [475,]       1254   0.1139855485
## [476,]       1255   0.1190721451
## [477,]       1256   0.1240820227
## [478,]       1257   0.1261203034
## [479,]       1258   0.1292359506
## [480,]       1259   0.1336725414
## [481,]       1260   0.1403035453
## [482,]       1261   0.1474069666
## [483,]       1262   0.1507260955
## [484,]       1263   0.1557297605
## [485,]       1264   0.1636610999
## [486,]       1265   0.1705073158
## [487,]       1266   0.1768235875
## [488,]       1267   0.1902811291
## [489,]       1268   0.2046218779
## [490,]       1269   0.2208024107
## [491,]       1270   0.2426028147
## [492,]       1271   0.2682173628
## [493,]       1272   0.3058444176
## [494,]       1273   0.3482662139
## [495,]       1274   0.4037607802
## [496,]       1275   0.4614470288
## [497,]       1276   0.5211443748
## [498,]       1277   0.5891991548
## [499,]       1278   0.6575407460
## [500,]       1279   0.7170374633
## [501,]       1280   0.7765464495
## [502,]       1281   0.8360704784
## [503,]       1282   0.8867307256
## [504,]       1283   0.9336560496
## [505,]       1284   0.9682549658
## [506,]       1285   0.9920065112
## [507,]       1286   0.9981240973
## [508,]       1287   0.9913978887
## [509,]       1288   0.9789057531
## [510,]       1289   0.9445578049
## [511,]       1290   0.9055721485
## [512,]       1291   0.8565667408
## [513,]       1292   0.7971161822
## [514,]       1293   0.7315023291
## [515,]       1294   0.6617238830
## [516,]       1295   0.5934631223
## [517,]       1296   0.5303436476
## [518,]       1297   0.4701425320
## [519,]       1298   0.4121401847
## [520,]       1299   0.3617733101
## [521,]       1300   0.3142460179
## [522,]       1301   0.2741493408
## [523,]       1302   0.2412469205
## [524,]       1303   0.2151557895
## [525,]       1304   0.1958384840
## [526,]       1305   0.1790275184
## [527,]       1306   0.1688343440
## [528,]       1307   0.1578029654
## [529,]       1308   0.1457835743
## [530,]       1309   0.1409083521
## [531,]       1310   0.1378654254
## [532,]       1311   0.1324760376
## [533,]       1312   0.1304795932
## [534,]       1313   0.1334021075
## [535,]       1314   0.1361051675
## [536,]       1315   0.1386527835
## [537,]       1316   0.1396514790
## [538,]       1317   0.1399499918
## [539,]       1318   0.1390213015
## [540,]       1319   0.1394081736
## [541,]       1320   0.1404094764
## [542,]       1321   0.1430119238
## [543,]       1322   0.1451141726
## [544,]       1323   0.1461454420
## [545,]       1324   0.1446925299
## [546,]       1325   0.1418341949
## [547,]       1326   0.1401221531
## [548,]       1327   0.1381181277
## [549,]       1328   0.1352341519
## [550,]       1329   0.1345778622
## [551,]       1330   0.1354091177
## [552,]       1331   0.1375319297
## [553,]       1332   0.1393353760
## [554,]       1333   0.1397877208
## [555,]       1334   0.1409294064
## [556,]       1335   0.1426072457
## [557,]       1336   0.1436096979
## [558,]       1337   0.1442286427
## [559,]       1338   0.1437155987
## [560,]       1339   0.1472691077
## [561,]       1340   0.1544107517
## [562,]       1341   0.1629802388
## [563,]       1342   0.1705330801
## [564,]       1343   0.1722488189
## [565,]       1344   0.1796485471
## [566,]       1345   0.1926880344
## [567,]       1346   0.1935467921
## [568,]       1347   0.1928771211
## [569,]       1348   0.1980512204
## [570,]       1349   0.2017835835
## [571,]       1350   0.2039199483
## [572,]       1351   0.2029814963
## [573,]       1352   0.2018016690
## [574,]       1353   0.2042224678
## [575,]       1354   0.2094303633
## [576,]       1355   0.2180019964
## [577,]       1356   0.2227028470
## [578,]       1357   0.2272906275
## [579,]       1358   0.2402170876
## [580,]       1359   0.2560411069
## [581,]       1360   0.2756502219
## [582,]       1361   0.2895296628
## [583,]       1362   0.3018732770
## [584,]       1363   0.3170797563
## [585,]       1364   0.3324678483
## [586,]       1365   0.3481108800
## [587,]       1366   0.3588774127
## [588,]       1367   0.3676705045
## [589,]       1368   0.3725481020
## [590,]       1369   0.3775076319
## [591,]       1370   0.3825878831
## [592,]       1371   0.3894465057
## [593,]       1372   0.3965480946
## [594,]       1373   0.3975487096
## [595,]       1374   0.3985289654
## [596,]       1375   0.3994779770
## [597,]       1376   0.4000545284
## [598,]       1377   0.4000806020
## [599,]       1378   0.3930380860
## [600,]       1379   0.3880195849
## [601,]       1380   0.3862108818
## [602,]       1381   0.3764096771
## [603,]       1382   0.3636701812
## [604,]       1383   0.3544674650
## [605,]       1384   0.3434402353
## [606,]       1385   0.3294956409
## [607,]       1386   0.3156465350
## [608,]       1387   0.3015211135
## [609,]       1388   0.2815254786
## [610,]       1389   0.2643523470
## [611,]       1390   0.2516923482
## [612,]       1391   0.2353294326
## [613,]       1392   0.2179550754
## [614,]       1393   0.2084400387
## [615,]       1394   0.1977170989
## [616,]       1395   0.1850785976
## [617,]       1396   0.1771976697
## [618,]       1397   0.1711112732
## [619,]       1398   0.1645027359
## [620,]       1399   0.1600501123
## [621,]       1400   0.1589332578
## [622,]       1401   0.1564915704
## [623,]       1402   0.1535747565
## [624,]       1403   0.1508507609
## [625,]       1404   0.1491909302
## [626,]       1405   0.1491118477
## [627,]       1406   0.1488214776
## [628,]       1407   0.1481890537
## [629,]       1408   0.1443953159
## [630,]       1409   0.1424280189
## [631,]       1410   0.1430245951
## [632,]       1411   0.1421703961
## [633,]       1412   0.1408573669
## [634,]       1413   0.1396868208
## [635,]       1414   0.1388976589
## [636,]       1415   0.1386106808
## [637,]       1416   0.1391474280
## [638,]       1417   0.1405110326
## [639,]       1418   0.1465273577
## [640,]       1419   0.1489837340
## [641,]       1420   0.1471096119
## [642,]       1421   0.1479983687
## [643,]       1422   0.1495409496
## [644,]       1423   0.1505865094
## [645,]       1424   0.1518668552
## [646,]       1425   0.1534071086
## [647,]       1426   0.1558449593
## [648,]       1427   0.1580904801
## [649,]       1428   0.1582245320
## [650,]       1429   0.1588156760
## [651,]       1430   0.1598639121
## [652,]       1431   0.1588003878
## [653,]       1432   0.1574175347
## [654,]       1433   0.1563750621
## [655,]       1434   0.1529090946
## [656,]       1435   0.1472879167
## [657,]       1436   0.1423957487
## [658,]       1437   0.1379552897
## [659,]       1438   0.1347637139
## [660,]       1439   0.1301735494
## [661,]       1440   0.1244869309
## [662,]       1441   0.1185669125
## [663,]       1442   0.1134528821
## [664,]       1443   0.1108292496
## [665,]       1444   0.1084861752
## [666,]       1445   0.1063335123
## [667,]       1446   0.1057110706
## [668,]       1447   0.1064582374
## [669,]       1448   0.1103696525
## [670,]       1449   0.1118303451
## [671,]       1450   0.1118809319
## [672,]       1451   0.1132456610
## [673,]       1452   0.1152404986
## [674,]       1453   0.1184719564
## [675,]       1454   0.1239252152
## [676,]       1455   0.1303181729
## [677,]       1456   0.1314504733
## [678,]       1457   0.1315717381
## [679,]       1458   0.1299938286
## [680,]       1459   0.1289645037
## [681,]       1460   0.1279680558
## [682,]       1461   0.1245953183
## [683,]       1462   0.1184223633
## [684,]       1463   0.1083812026
## [685,]       1464   0.1004662246
## [686,]       1465   0.0933155268
## [687,]       1466   0.0871075177
## [688,]       1467   0.0800079943
## [689,]       1468   0.0719059792
## [690,]       1469   0.0693380632
## [691,]       1470   0.0669654344
## [692,]       1471   0.0596929639
## [693,]       1472   0.0540365195
## [694,]       1473   0.0498513853
## [695,]       1474   0.0468435153
## [696,]       1475   0.0440626688
## [697,]       1476   0.0414827002
## [698,]       1477   0.0402681996
## [699,]       1478   0.0400421694
## [700,]       1479   0.0392729721
## [701,]       1480   0.0388874590
## [702,]       1481   0.0395606385
## [703,]       1482   0.0388796513
## [704,]       1483   0.0374325457
## [705,]       1484   0.0386193781
## [706,]       1485   0.0406983069
## [707,]       1486   0.0444220433
## [708,]       1487   0.0424049178
## [709,]       1488   0.0383106389
## [710,]       1489   0.0399917707
## [711,]       1490   0.0416074057
## [712,]       1491   0.0431296067
## [713,]       1492   0.0439189238
## [714,]       1493   0.0444032356
## [715,]       1494   0.0443059273
## [716,]       1495   0.0448726590
## [717,]       1496   0.0461574169
## [718,]       1497   0.0454143807
## [719,]       1498   0.0442268761
## [720,]       1499   0.0428245307
## [721,]       1500   0.0424951588
## [722,]       1501   0.0430340249
## [723,]       1502   0.0395760449
## [724,]       1503   0.0372976673
## [725,]       1504   0.0393280755
## [726,]       1505   0.0398044694
## [727,]       1506   0.0393562001
## [728,]       1507   0.0396172300
## [729,]       1508   0.0396390191
## [730,]       1509   0.0391893991
## [731,]       1510   0.0407139011
## [732,]       1511   0.0426480503
## [733,]       1512   0.0385425186
## [734,]       1513   0.0353963676
## [735,]       1514   0.0335544444
## [736,]       1515   0.0323618162
## [737,]       1516   0.0315463726
## [738,]       1517   0.0318934501
## [739,]       1518   0.0308012772
## [740,]       1519   0.0283141359
## [741,]       1520   0.0260811472
## [742,]       1521   0.0243297722
## [743,]       1522   0.0240587278
## [744,]       1523   0.0219107922
## [745,]       1524   0.0184786679
## [746,]       1525   0.0175825023
## [747,]       1526   0.0169371874
## [748,]       1527   0.0165825603
## [749,]       1528   0.0178944346
## [750,]       1529   0.0198407099
## [751,]       1530   0.0190023342
## [752,]       1531   0.0168859766
## [753,]       1532   0.0129317575
## [754,]       1533   0.0116403732
## [755,]       1534   0.0113732119
## [756,]       1535   0.0126513949
## [757,]       1536   0.0117826606
## [758,]       1537   0.0088167414
## [759,]       1538   0.0104359440
## [760,]       1539   0.0118060780
## [761,]       1540   0.0101788145
## [762,]       1541   0.0085842363
## [763,]       1542   0.0070111309
## [764,]       1543   0.0084854392
## [765,]       1544   0.0093164146
## [766,]       1545   0.0086813610
## [767,]       1546   0.0087463642
## [768,]       1547   0.0091691425
## [769,]       1548   0.0103903728
## [770,]       1549   0.0110905831
## [771,]       1550   0.0111262034
## [772,]       1551   0.0105083903
## [773,]       1552   0.0102933901
## [774,]       1553   0.0127015769
## [775,]       1554   0.0149774713
## [776,]       1555   0.0171428849
## [777,]       1556   0.0186684541
## [778,]       1557   0.0186858710
## [779,]       1558   0.0150733767
## [780,]       1559   0.0119871565
## [781,]       1560   0.0092681853
## [782,]       1561   0.0099726072
## [783,]       1562   0.0109439084
## [784,]       1563   0.0123247771
## [785,]       1564   0.0122757318
## [786,]       1565   0.0115712203
## [787,]       1566   0.0095142858
## [788,]       1567   0.0097482992
## [789,]       1568   0.0121854814
## [790,]       1569   0.0126125161
## [791,]       1570   0.0125729309
## [792,]       1571   0.0119462850
## [793,]       1572   0.0106388281
## [794,]       1573   0.0089262779
## [795,]       1574   0.0135313249
## [796,]       1575   0.0160617654
## [797,]       1576   0.0151055651
## [798,]       1577   0.0128501051
## [799,]       1578   0.0106301926
## [800,]       1579   0.0118444748
## [801,]       1580   0.0133146721
## [802,]       1581   0.0150448143
## [803,]       1582   0.0140989330
## [804,]       1583   0.0142903660
## [805,]       1584   0.0191790965
## [806,]       1585   0.0214554408
## [807,]       1586   0.0221512513
## [808,]       1587   0.0204009904
## [809,]       1588   0.0188495510
## [810,]       1589   0.0176374584
## [811,]       1590   0.0180631323
## [812,]       1591   0.0190219431
## [813,]       1592   0.0199326825
## [814,]       1593   0.0208982230
## [815,]       1594   0.0219172951
## [816,]       1595   0.0232260826
## [817,]       1596   0.0244157433
## [818,]       1597   0.0251608742
## [819,]       1598   0.0257840553
## [820,]       1599   0.0263723150
## [821,]       1600   0.0288648052
## [822,]       1601   0.0298402890
## [823,]       1602   0.0285066316
## [824,]       1603   0.0289995125
## [825,]       1604   0.0299814685
## [826,]       1605   0.0307792656
## [827,]       1606   0.0316347920
## [828,]       1607   0.0325400704
## [829,]       1608   0.0301859372
## [830,]       1609   0.0283207676
## [831,]       1610   0.0283214388
## [832,]       1611   0.0295107192
## [833,]       1612   0.0312998600
## [834,]       1613   0.0336269540
## [835,]       1614   0.0376140991
## [836,]       1615   0.0437020191
## [837,]       1616   0.0423284911
## [838,]       1617   0.0409369401
## [839,]       1618   0.0455713514
## [840,]       1619   0.0492186361
## [841,]       1620   0.0521795091
## [842,]       1621   0.0562887600
## [843,]       1622   0.0607059647
## [844,]       1623   0.0656230096
## [845,]       1624   0.0701540077
## [846,]       1625   0.0748614385
## [847,]       1626   0.0817522088
## [848,]       1627   0.0872677090
## [849,]       1628   0.0914502523
## [850,]       1629   0.0972779357
## [851,]       1630   0.1034229717
## [852,]       1631   0.1098863891
## [853,]       1632   0.1166672893
## [854,]       1633   0.1238524767
## [855,]       1634   0.1355925874
## [856,]       1635   0.1449096161
## [857,]       1636   0.1511112536
## [858,]       1637   0.1549272993
## [859,]       1638   0.1589852489
## [860,]       1639   0.1658513001
## [861,]       1640   0.1734439787
## [862,]       1641   0.1815258254
## [863,]       1642   0.1854854617
## [864,]       1643   0.1879674190
## [865,]       1644   0.1880759152
## [866,]       1645   0.1907102602
## [867,]       1646   0.1940266784
## [868,]       1647   0.1967326129
## [869,]       1648   0.1989168181
## [870,]       1649   0.2006549060
## [871,]       1650   0.2034223439
## [872,]       1651   0.2056262541
## [873,]       1652   0.2064519141
## [874,]       1653   0.2077877247
## [875,]       1654   0.2088967642
## [876,]       1655   0.2060631327
## [877,]       1656   0.2070057954
## [878,]       1657   0.2118752079
## [879,]       1658   0.2104939260
## [880,]       1659   0.2090573401
## [881,]       1660   0.2097410530
## [882,]       1661   0.2058879440
## [883,]       1662   0.2001280968
## [884,]       1663   0.2008364895
## [885,]       1664   0.2007708023
## [886,]       1665   0.1997560265
## [887,]       1666   0.1978511284
## [888,]       1667   0.1957459144
## [889,]       1668   0.1935327991
## [890,]       1669   0.1895544345
## [891,]       1670   0.1845627300
## [892,]       1671   0.1812567587
## [893,]       1672   0.1760848106
## [894,]       1673   0.1682934906
## [895,]       1674   0.1661871888
## [896,]       1675   0.1641983171
## [897,]       1676   0.1575139943
## [898,]       1677   0.1493171636
## [899,]       1678   0.1401103504
## [900,]       1679   0.1375688174
## [901,]       1680   0.1327667591
## [902,]       1681   0.1244266297
## [903,]       1682   0.1172614506
## [904,]       1683   0.1106633136
## [905,]       1684   0.1051735456
## [906,]       1685   0.0976214477
## [907,]       1686   0.0885883463
## [908,]       1687   0.0832067510
## [909,]       1688   0.0781697632
## [910,]       1689   0.0735698486
## [911,]       1690   0.0669943463
## [912,]       1691   0.0605993712
## [913,]       1692   0.0578625350
## [914,]       1693   0.0544674195
## [915,]       1694   0.0505763391
## [916,]       1695   0.0469317908
## [917,]       1696   0.0446375686
## [918,]       1697   0.0446383269
## [919,]       1698   0.0419442243
## [920,]       1699   0.0384607861
## [921,]       1700   0.0350653012
## [922,]       1701   0.0326251763
## [923,]       1702   0.0309106009
## [924,]       1703   0.0326762206
## [925,]       1704   0.0343761321
## [926,]       1705   0.0357744272
## [927,]       1706   0.0330542199
## [928,]       1707   0.0301838330
## [929,]       1708   0.0323976907
## [930,]       1709   0.0327971728
## [931,]       1710   0.0318620132
## [932,]       1711   0.0326319127
## [933,]       1712   0.0331176894
## [934,]       1713   0.0330807267
## [935,]       1714   0.0341905464
## [936,]       1715   0.0349732598
## [937,]       1716   0.0329629447
## [938,]       1717   0.0358504193
## [939,]       1718   0.0421162355
## [940,]       1719   0.0409096971
## [941,]       1720   0.0408165882
## [942,]       1721   0.0424710327
## [943,]       1722   0.0436245132
## [944,]       1723   0.0446979778
## [945,]       1724   0.0459288165
## [946,]       1725   0.0467420074
## [947,]       1726   0.0474010626
## [948,]       1727   0.0534346129
## [949,]       1728   0.0577123378
## [950,]       1729   0.0596221123
## [951,]       1730   0.0602862705
## [952,]       1731   0.0616155925
## [953,]       1732   0.0658438459
## [954,]       1733   0.0685572697
## [955,]       1734   0.0705430187
## [956,]       1735   0.0742690683
## [957,]       1736   0.0757143609
## [958,]       1737   0.0745132094
## [959,]       1738   0.0788637984
## [960,]       1739   0.0824457001
## [961,]       1740   0.0819241089
## [962,]       1741   0.0818310009
## [963,]       1742   0.0819741210
## [964,]       1743   0.0825003616
## [965,]       1744   0.0802122520
## [966,]       1745   0.0751749856
## [967,]       1746   0.0747653156
## [968,]       1747   0.0732698489
## [969,]       1748   0.0686547718
## [970,]       1749   0.0724111392
## [971,]       1750   0.0772495915
#test savitzky-golay smoother - works like a charm nice and easy
plastic_approx_smoother <- sgolayfilt(plastic_approx, 3,11)

plot(hyper_baseline_corr@wavelength, hyper_baseline_corr@data[["spc"]], type = "l")+
lines(freq_index, plastic_approx, col = "red")+lines(freq_index, plastic_approx_smoother, col = "green")

## integer(0)
#Black means its approx poorly  - red is good approximation

unique(ref_lib$poly_lab)
##  [1] "ABS"  "HDPE" "LDPE" "PA"   "PC"   "PET"  "PLA"  "PMMA" "Poly" "POM" 
## [11] "PP"   "PS"   "PSA"  "PVC"  "."
abs_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "ABS")

cor.test(plastic_approx, abs_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and abs_reference$INTENSITY
## t = -3.2904, df = 969, p-value = 0.001036
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.16692691 -0.04248696
## sample estimates:
##        cor 
## -0.1051184
HDPE_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "HDPE")

cor.test(plastic_approx, HDPE_reference$INTENSITY)
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and HDPE_reference$INTENSITY
## t = 2.6683, df = 969, p-value = 0.007751
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.0226140 0.1475247
## sample estimates:
##        cor 
## 0.08540492
LDPE_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "LDPE")

cor.test(plastic_approx, LDPE_reference$INTENSITY)
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and LDPE_reference$INTENSITY
## t = 1.5896, df = 969, p-value = 0.1122
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.01195106  0.11354782
## sample estimates:
##        cor 
## 0.05099971
plot(freq_index, LDPE_reference$INTENSITY, type = "l")+
lines(freq_index, plastic_approx, col = "red")

## integer(0)
PA_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PA")

cor.test(plastic_approx, PA_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PA_reference$INTENSITY
## t = -2.0275, df = 969, p-value = 0.04289
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.127384974 -0.002089523
## sample estimates:
##         cor 
## -0.06499341
plot(freq_index, PA_reference$INTENSITY, type = "l")+
lines(freq_index, plastic_approx, col = "red")

## integer(0)
PC_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PC")

cor.test(plastic_approx, PC_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PC_reference$INTENSITY
## t = -4.4571, df = 969, p-value = 9.277e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20284087 -0.07953396
## sample estimates:
##        cor 
## -0.1417372
plot(freq_index, PC_reference$INTENSITY, type = "l")+
lines(freq_index, plastic_approx, col = "red")

## integer(0)
PET_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PET")

cor.test(plastic_approx, PET_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PET_reference$INTENSITY
## t = -3.6079, df = 969, p-value = 0.0003244
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.17676533 -0.05260185
## sample estimates:
##        cor 
## -0.1151333
PLA_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PLA")

cor.test(plastic_approx, PLA_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PLA_reference$INTENSITY
## t = 1.8277, df = 969, p-value = 0.0679
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.004315159  0.121079132
## sample estimates:
##        cor 
## 0.05861318
PMMA_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PMMA")

cor.test(plastic_approx, PMMA_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PMMA_reference$INTENSITY
## t = -3.2815, df = 969, p-value = 0.001069
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.16664984 -0.04220247
## sample estimates:
##        cor 
## -0.1048366
Poly_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "Poly")

cor.test(plastic_approx, Poly_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and Poly_reference$INTENSITY
## t = -5.7582, df = 969, p-value = 1.141e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2420367 -0.1203589
## sample estimates:
##       cor 
## -0.181894
POM_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "POM")

cor.test(plastic_approx, POM_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and POM_reference$INTENSITY
## t = 4.6299, df = 969, p-value = 4.157e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08498897 0.20810118
## sample estimates:
##       cor 
## 0.1471148
PP_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PP")

cor.test(plastic_approx, PP_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PP_reference$INTENSITY
## t = 4.0798, df = 969, p-value = 4.879e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.0675895 0.1912978
## sample estimates:
##       cor 
## 0.1299494
PS_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PS")

cor.test(plastic_approx, PS_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PS_reference$INTENSITY
## t = -6.3449, df = 969, p-value = 3.41e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2593757 -0.1385508
## sample estimates:
##        cor 
## -0.1997223
PSA_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PSA")

cor.test(plastic_approx, PSA_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PSA_reference$INTENSITY
## t = -4.6472, df = 969, p-value = 3.829e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20862802 -0.08553572
## sample estimates:
##        cor 
## -0.1476536
PVC_reference <- dplyr::filter(plastic_ref_lib, SAMPLE == "PVC")

cor.test(plastic_approx, PVC_reference$INTENSITY, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  plastic_approx and PVC_reference$INTENSITY
## t = 10.367, df = 969, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2582033 0.3715099
## sample estimates:
##       cor 
## 0.3159829
cor(plastic_approx, PVC_reference$INTENSITY, method = "pearson")
## [1] 0.3159829
plot(freq_index, PVC_reference$INTENSITY, type = "l")+
lines(freq_index, plastic_approx, col = "red")

## integer(0)
#Same value as cor.test

#This is what they used for their hit index in Choy et al. 2019
#PVC is the highest correlation by far

#This version is deprecated as it takes all the spectra from that study and not just the plastic reference.
#poly_labs <- as.character(unique(ref_lib$poly_lab))

poly_labs <-as.character(unique(plastic_ref_lib$poly_lab))

cor_table <- as.data.frame(matrix(ncol = length(poly_labs), nrow = 1, dimnames = list(NULL, poly_labs)))

#for(name in poly_labs){
#  temp_filter <- filter(plastic_ref_lib, poly_lab == name)
#  cor_table[,name] <- cor(plastic_approx, temp_filter$INTENSITY, method = "pearson")
  
#}

#That for loop did not work

plastic_lab <- data.frame()

for(i in 1:length(poly_labs)){
  temp_filter <- dplyr::filter(plastic_ref_lib, poly_lab == poly_labs[i])
  cor_table[,i] <- round(cor(plastic_approx, temp_filter$INTENSITY, method = "pearson"), digits = 3)
  
 for (d in 1:nrow(cor_table)){
  plastic_lab[d,1]<-colnames(cor_table[which.max(cor_table[d,])])
  
  }
}


ggtexttable(cor_table, theme = ttheme(base_size = 7.5)) %>% table_cell_bg(row = 2, column = 15, fill = "red")

setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/10_24_19_spectral_data/")
plastic_test_files <- list.files(path = "/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/10_24_19_spectral_data/", pattern = "*.txt")

file_numbers <- seq(plastic_test_files)

plastic_test_spc_table <- matrix()

freq_index <- seq(780, 1750, by = 1)

all_sample_particle_WV <- as.data.frame(freq_index)

#start of a larger raman data import function need to uncomment for it to work

#Raman_large_import <- function(filepath){
  #freq_index <- seq(780, 1750, by = 1)

#all_sample_particle_WV <- as.data.frame(freq_index)
#for loop over .txt files and create a df
for(filename in plastic_test_files){
  temp_csv <- read.delim(file = filename, header = F, sep = "\t")
  colnames(temp_csv) <- c("Wavelength", "Counts")
  temp_csv_matrix <- as.matrix(temp_csv)
  approx_test_fun <- approxfun(x = temp_csv_matrix[,'Wavelength'], y = temp_csv_matrix[,'Counts'])
  new_counts <- approx_test_fun(freq_index)
  all_sample_particle_WV[filename] <- new_counts
}

all_sample_particle_WV_t <- t(all_sample_particle_WV)

colnames(all_sample_particle_WV_t) <- all_sample_particle_WV_t[1,]

all_sample_particle_WV_t <- all_sample_particle_WV_t[-1,]

potplastic_filename <- rownames(all_sample_particle_WV_t)

potp_hyper <- as.hyperSpec(all_sample_particle_WV_t, data = data.frame(potplastic_filename))

#This version of as.hyper works and keeps the filenames for each raman spectra

#Baselines
potp_baselines <-  spc.fit.poly.below(potp_hyper, poly.order = 6)
#Plotting baseline corrections
plot(potp_hyper-potp_baselines)
title(xlab = "Wavelength",ylab = "Arbitrary unit of excitation")

potp_hyper_corrected <- potp_hyper-potp_baselines

#Standard Normal variate normalization
potp_hyper_corrected@data[["spc"]] <- standardNormalVariate(potp_hyper_corrected@data[["spc"]])

#min-max scaling
potp_hyper_corrected@data[["spc"]] <- (potp_hyper_corrected@data[["spc"]] - min(potp_hyper_corrected@data[["spc"]])) / (max(potp_hyper_corrected@data[["spc"]])-min(potp_hyper_corrected@data[["spc"]]))
#}

plot(potp_hyper_corrected, col = rainbow(39),title.args = list(xlab = "Wavelength",ylab = "Arbitrary unit of Intensity"))

#View(t(all_sample_particle_WV))

This chunk now imports and loops over all .txt files which will correspond to individual particles and transform them into a matrix for proper raman processing. Now I need to make them into a hyperspec obj and do the proper standard normal variate, baseline correction, and min-max standardization.

#poly_labs <- as.character(unique(ref_lib$poly_lab))

#poly_labs <- poly_labs[-15]
#poly_labs <-as.character(unique(plastic_ref_lib$poly_lab))

poly_labs <-as.character(unique(plastic_ref_lib$poly_lab))

cor_table_manyplastic <- as.data.frame(matrix(ncol = length(poly_labs), nrow = nrow(potp_hyper_corrected@data[["spc"]]), dimnames = list(NULL, poly_labs)))

for(row in 1:nrow(potp_hyper_corrected@data[["spc"]])){
  for(i in seq_along(poly_labs)){
  temp_filter <- dplyr::filter(plastic_ref_lib, poly_lab == poly_labs[i])
  cor_table_manyplastic[row,i] <- round(cor(potp_hyper_corrected@data[["spc"]][row,], temp_filter$INTENSITY, method = "pearson"), digits = 3)
}
}

plastic_lab <- as.data.frame(matrix(nrow = nrow(cor_table_manyplastic), ncol = 2))

colnames(plastic_lab)  <- c("Hit_Index_Value","Polymer_ID")

rownames(plastic_lab) <- plastic_test_files

for (d in 1:nrow(cor_table_manyplastic)){
  plastic_lab[d,1]<-cor_table_manyplastic[d,which.max(cor_table_manyplastic[d,])]
  plastic_lab[d,2]<-colnames(cor_table_manyplastic[which.max(cor_table_manyplastic[d,])])
  
  }

plastic_lab_filt <- plastic_lab %>% 
  rownames_to_column('filename') %>% 
  dplyr::filter(Hit_Index_Value > 0.22) %>% 
  column_to_rownames('filename')

plastic_lab_count <- group_by(plastic_lab_filt, Polymer_ID) %>% summarise(n())

plastic_lab_count
## # A tibble: 4 x 2
##   Polymer_ID `n()`
##   <chr>      <int>
## 1 PA            13
## 2 PET            1
## 3 PMMA           1
## 4 POM            3
ggtexttable(plastic_lab_count)

ggtexttable(plastic_lab_filt)

#temp_row <- potp_hyper_corrected@data[["spc"]][row,]

#for(row in 1:nrow(potp_hyper_corrected@data[["spc"]])){
  #print(potp_hyper_corrected@data[["spc"]][row,])
#}

#for(i in 1:length(poly_labs)){
#  temp_filter <- filter(plastic_ref_lib, poly_lab == poly_labs[i])
#  return(temp_filter)
#}
#Does this pipeline hold up to with the new spectral data?
#If so, I need to add in additional reference from openspecy, data which I can download
#Making notes of each step to make it more readable for future reference
setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/Antarctic_Microplastic_Raman_Spectra/6_13_23_Raman_test_runs/")
#Creates a list of all file names within the desired folder 
#Each folder with house an entire samples spectral data
plastic_test_files <- list.files(path = "/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/Antarctic_Microplastic_Raman_Spectra/6_13_23_Raman_test_runs/", pattern = "*.txt")
#Index values to be looped over
file_numbers <- seq(plastic_test_files)
#Blank matrix table to be inserted into an hyperspec object
plastic_test_spc_table <- matrix()
#Desired range of spectral data for identification
#data range collected is much larger, ranging form ~100 - ~2500 wavelength
freq_index <- seq(780, 1750, by = 1)
#Empty dataframe from which to add in each spectra
all_sample_particle_WV <- as.data.frame(freq_index)

#start of a larger raman data import function need to uncomment for it to work

#Raman_large_import <- function(filepath){
  #freq_index <- seq(780, 1750, by = 1)

#all_sample_particle_WV <- as.data.frame(freq_index)

#for loop over .txt files and create a df of spectra
#This loops and adds the smoothed version of the spectra within the wavelength ranges desired, which can be changed at any time by changing the "freq_index" object
for(filename in plastic_test_files){
  temp_csv <- read.delim(file = filename, header = F, sep = "\t")
  colnames(temp_csv) <- c("Wavelength", "Counts")
  temp_csv_matrix <- as.matrix(temp_csv)
  approx_test_fun <- approxfun(x = temp_csv_matrix[,'Wavelength'], y = temp_csv_matrix[,'Counts'])
  new_counts <- approx_test_fun(freq_index)
  all_sample_particle_WV[filename] <- new_counts
}
#Matrix is in the wrong format and needs to by transposed to fit the hyperspec obj
all_sample_particle_WV_t <- t(all_sample_particle_WV)
#Converting the first column into column names
colnames(all_sample_particle_WV_t) <- all_sample_particle_WV_t[1,]

all_sample_particle_WV_t <- all_sample_particle_WV_t[-1,]
#Extracting the filenames or name of specific spectra being analyzed
potplastic_filename <- rownames(all_sample_particle_WV_t)
#Making hyperspec obj with matrix of spectra with filename meta data
potp_hyper <- as.hyperSpec(all_sample_particle_WV_t, data = data.frame(potplastic_filename))

#This version of as.hyper works and keeps the filenames for each raman spectra

#Baseline correction
potp_baselines <-  spc.fit.poly.below(potp_hyper, poly.order = 6)
#Plotting baseline corrections
plot(potp_hyper-potp_baselines)
title(xlab = "Wavelength",ylab = "Arbitrary unit of excitation")

potp_hyper_corrected <- potp_hyper-potp_baselines

#Standard Normal variate normalization
potp_hyper_corrected@data[["spc"]] <- standardNormalVariate(potp_hyper_corrected@data[["spc"]])

#min-max scaling
potp_hyper_corrected@data[["spc"]] <- (potp_hyper_corrected@data[["spc"]] - min(potp_hyper_corrected@data[["spc"]])) / (max(potp_hyper_corrected@data[["spc"]])-min(potp_hyper_corrected@data[["spc"]]))
#}

plot(potp_hyper_corrected, col = rainbow(39),title.args = list(xlab = "Wavelength",ylab = "Arbitrary unit of Intensity"))

#Extracting unique names from reference library
#poly_labs <- as.character(unique(ref_lib$poly_lab))
#remove the last column (why?)
#poly_labs <- poly_labs[-15]

#This previous version took all samples from the study and not just the reference plastic. All of the categorized "." were environmental samples thus necessitating removal. I had a filtered df for plastic reference only so use that df for plastic label names.

poly_labs <-as.character(unique(plastic_ref_lib$poly_lab))
#Create an correlation matrix to fill that are the dimensions of the plastic reference vs the number of spectra collected within a single sample
cor_table_manyplastic <- as.data.frame(matrix(ncol = length(poly_labs), nrow = nrow(potp_hyper_corrected@data[["spc"]]), dimnames = list(NULL, poly_labs)))
#Calculating correlations and filling the DF with the values
for(row in 1:nrow(potp_hyper_corrected@data[["spc"]])){
  for(i in seq_along(poly_labs)){
  temp_filter <- dplyr::filter(plastic_ref_lib, poly_lab == poly_labs[i])
  cor_table_manyplastic[row,i] <- round(cor(potp_hyper_corrected@data[["spc"]][row,], temp_filter$INTENSITY, method = "pearson"), digits = 3)
}
}
#Creating an empty df to hold the identified plastic info in
plastic_lab <- as.data.frame(matrix(nrow = nrow(cor_table_manyplastic), ncol = 2))

colnames(plastic_lab)  <- c("Hit_Index_Value","Polymer_ID")

rownames(plastic_lab) <- plastic_test_files
#Search the correlation matrix for plastic that are the highest correlated to the spectra with the filename (or really particle name).
for (d in 1:nrow(cor_table_manyplastic)){
  plastic_lab[d,1]<-cor_table_manyplastic[d,which.max(cor_table_manyplastic[d,])]
  plastic_lab[d,2]<-colnames(cor_table_manyplastic[which.max(cor_table_manyplastic[d,])])
  
  }
#Filter spectra that don't meet the spectra limit
plastic_lab_filt <- plastic_lab %>% 
  rownames_to_column('filename') %>% 
  dplyr::filter(Hit_Index_Value > 0.22) %>% 
  column_to_rownames('filename')

#Summarise the counts for each polymer - But I need to have a way to add to a df with polymers unidentified in the sample but we have references for.
plastic_lab_count <- group_by(plastic_lab_filt, Polymer_ID) %>% summarise(n())

plastic_lab_count
## # A tibble: 6 x 2
##   Polymer_ID `n()`
##   <chr>      <int>
## 1 PA             5
## 2 PC             1
## 3 PET            2
## 4 PLA            1
## 5 POM            1
## 6 PP             3
ggtexttable(plastic_lab_count)

ggtexttable(plastic_lab_filt)

#Its the summarised counts that I need to import into a new df with each sample and 

#Some Notes From OpenSpecy Metadata and SOP OpenSpecy uses the same hit indexing as I have used in my Raman pipeline. They do the same baseline removal. My cutoff threshold is slightly lower than their threshold of 0.3, whereas due to degredation I’m using a cutoff (0.22) designated from the 2019 paper I adopted this identification process from. That study used degraded fishing tools as their reference to create the cutoff. OpenSpecy have an R shiny App I could use for identification but I believe since their algorithyms are the same I am going to continue writing my script using the Hyperspec Package and data structure to make downstream analysis a bit easier and allows for greater flexibility with what I can do with the data.

The main issue here is you need to analyze each spectra one at a time. My script allows for analysis for an entire samples hundreds of spectra in a single run of the code.

#State of the script I want to make this script have the ability to take in a single spectra for a sample up to thousands of spectra in a single sample and be able to identify each plastic polymer and enumerate them ##Steps I have done: Spectral Preprossessing (smoothing, scaling, baseline correction) Make into a single function Spectral Identification (correlations, hit index, selecting highest correlation) Make into a single function - return a df with the identification ##What is my script missing? Data frame with polymer IDs and total for each polymer with additional environmental data Create data frame from which I can add to as I collect samples with sample name, depth, size fraction, and all the collected information. I need to add to the reference library - the one from OpenSpecy with thousands of different polymer reference spectra I want to see if I can make the plots with ggplot and a hyperspec object…think I can by extracting the SPC data from the “HS” obj I want to see if I can apply the same smoothing function as openspecy does as I am using their reference database…Its not necessary as it makes almost no difference in the estimated coefficients and the approxfun cleans it up enough, although may make some correlations lower than they otherwise would be.

There are some important peaks being missed by not including the 500 nm wavelegnth range. I will change the range of the smoothing process from 750 to 500 and change the upper range to 1900 - 2000 nm.

#If I can import OpenSpecy library and get the same values as they do I will be happy to move onto the next step.
open_spec_reflib <- read.csv("/Users/christophercarnivale/Desktop/Dissertation_data/Microplastic_antarctica/raman_library.csv")

open_spec_reflib_metadata <- read.csv("/Users/christophercarnivale/Desktop/Dissertation_data/Microplastic_antarctica/raman_metadata.csv")

#Need to merge libraries and add information to the metadata csv file for my use

#First change the df to fit that I'm merging
plastic_ref_lib_for_merge <- select(plastic_ref_lib, WAVE, INTENSITY, poly_lab)

plastic_ref_lib_for_merge['sample_name'] <- 1

for(i in seq_along(poly_labs)){
  plastic_ref_lib_for_merge[which(plastic_ref_lib_for_merge$poly_lab == poly_labs[i]),]['sample_name'] <- rep(seq(623, 623+length(poly_labs), by = 1)[i], nrow(plastic_ref_lib_for_merge[which(plastic_ref_lib_for_merge$poly_lab == poly_labs[i]),]))
} 

plastic_ref_lib_for_merge <- select(plastic_ref_lib_for_merge, WAVE, INTENSITY, sample_name, poly_lab) 
colnames(plastic_ref_lib_for_merge) <- colnames(open_spec_reflib)#This now makes the libraries compatible for merger
#Create a single hyperspec object with all of the reference spectra in the "spc" portion of the data.

#Vector of values on with to index the reference library dataframe. I dont need to create a hyperspec object UNLESS I need to change the values of the reference library.
OS_plastic_id_name <- unique(open_spec_reflib$sample_name)

#I don't think I need to create a hyperspec object I just need to convert the library to a form in which can be used in a cor analysis. Cor() needs the same number of observations for both inputs for the comparison.
#This essentially means I need to convert the raw library spectra with the same smoothing and approx patterns. I should finish applying the smoothing function into the script and then apply it to the library.

#This doesn't work as there are too many spectra with similar spectrum identity names
test_id_name <- unique(open_spec_reflib_metadata$spectrum_identity)

#Create an correlation matrix to fill that are the dimensions of the plastic reference vs the number of spectra collected within a single sample
cor_table_manyplastic <- as.data.frame(matrix(ncol = length(OS_plastic_id_name), nrow = nrow(potp_hyper_corrected@data[["spc"]]), dimnames = list(NULL, OS_plastic_id_name)))
#Calculating correlations and filling the DF with the values
for(row in 1:nrow(potp_hyper_corrected@data[["spc"]])){
  for(i in seq_along(OS_plastic_id_name)){
  temp_filter <- dplyr::filter(open_spec_reflib, OS_plastic_id_name == OS_plastic_id_name[i])
  #This is the step where I subset the reference into the same form as the imported data processed prior
  #Now I need to process the original spectra in the same manner that I have 
  cor_table_manyplastic[row,i] <- round(cor(potp_hyper_corrected@data[["spc"]][row,], temp_filter$INTENSITY, method = "pearson"), digits = 3)
}
}

#head(open_spec_reflib_metadata)
#head(open_spec_reflib)
#head(plastic_ref_lib_for_merge)
#str(open_spec_reflib)

#MERGING libraries here...
Merge_test <- rbind(plastic_ref_lib_for_merge, open_spec_reflib)
#This works
#Now I have a df from which I can parse out and use for plasic identification
#Does this pipeline hold up to with the new spectral data?
#If so, I need to add in additional reference from openspecy, data which I can download
#Making notes of each step to make it more readable for future reference
setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/Antarctic_Microplastic_Raman_Spectra/Test_6_28_23/St_3/Less_20/")
#Creates a list of all file names within the desired folder 
#Each folder with house an entire samples spectral data
plastic_test_files <- list.files(path = "/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/Antarctic_Microplastic_Raman_Spectra/Test_6_28_23/St_3/Less_20/", pattern = "*.txt")
#Index values to be looped over
file_numbers <- seq(plastic_test_files)
#Blank matrix table to be inserted into an hyperspec object
plastic_test_spc_table <- matrix()
#Desired range of spectral data for identification
#data range collected is much larger, ranging form ~100 - ~2500 wavelength
freq_index <- seq(500, 1750, by = 0.1)
#Empty dataframe from which to add in each spectra
all_sample_particle_WV <- as.data.frame(freq_index)

#start of a larger raman data import function need to uncomment for it to work

#Raman_large_import <- function(filepath){
  #freq_index <- seq(780, 1750, by = 1)

#all_sample_particle_WV <- as.data.frame(freq_index)

#for loop over .txt files and create a df of spectra
#This loops and adds the smoothed version of the spectra within the wavelength ranges desired, which can be changed at any time by changing the "freq_index" object
for(filename in plastic_test_files){
  temp_csv <- read.delim(file = filename, header = F, sep = "\t")
  colnames(temp_csv) <- c("Wavelength", "Counts")
  temp_csv_matrix <- as.matrix(temp_csv)
  approx_test_fun <- approxfun(x = temp_csv_matrix[,'Wavelength'], y = temp_csv_matrix[,'Counts'], rule = 2)
  new_counts <- approx_test_fun(freq_index)
  new_counts_smoother <- sgolayfilt(new_counts, 3,11, m = 1)
  all_sample_particle_WV[filename] <- new_counts_smoother
}
#Matrix is in the wrong format and needs to by transposed to fit the hyperspec obj
all_sample_particle_WV_t <- t(all_sample_particle_WV)
#Converting the first row into column names
colnames(all_sample_particle_WV_t) <- all_sample_particle_WV_t[1,]

all_sample_particle_WV_t <- all_sample_particle_WV_t[-1,]
#Extracting the filenames or name of specific spectra being analyzed
potplastic_filename <- rownames(all_sample_particle_WV_t)
#Making hyperspec obj with matrix of spectra with filename meta data
potp_hyper <- as.hyperSpec(all_sample_particle_WV_t, data = data.frame(potplastic_filename))

#This version of as.hyper works and keeps the filenames for each raman spectra

#Baseline correction
potp_baselines <-  spc.fit.poly.below(potp_hyper, poly.order = 6)
#Plotting baseline corrections
plot(potp_hyper-potp_baselines)
title(xlab = "Wavelength",ylab = "Arbitrary unit of excitation")

potp_hyper_corrected <- potp_hyper-potp_baselines

#Standard Normal variate normalization
potp_hyper_corrected@data[["spc"]] <- standardNormalVariate(potp_hyper_corrected@data[["spc"]])

#min-max scaling
potp_hyper_corrected@data[["spc"]] <- (potp_hyper_corrected@data[["spc"]] - min(potp_hyper_corrected@data[["spc"]])) / (max(potp_hyper_corrected@data[["spc"]])-min(potp_hyper_corrected@data[["spc"]]))
#}

plot(potp_hyper_corrected, col = rainbow(39),title.args = list(xlab = "Wavelength",ylab = "Arbitrary unit of Intensity"))+legend(500, 1, legend = potplastic_filename,col = rainbow(39))
plot(potp_hyper_corrected)
#Implemented the new smoothing algorithm...now I need to implement this identification with the new library and how that works.

#Extracting unique names from reference library
#poly_labs <- as.character(unique(ref_lib$poly_lab))
#remove the last column (why?)
#poly_labs <- poly_labs[-15]

#This previous version took all samples from the study and not just the reference platic. All of the categorized "." were environmental samples thus necessitating removal. I had a filtered df for plastic reference only so use that df for plastic label names.

poly_labs <-as.character(unique(plastic_ref_lib$poly_lab))
#Create an correlation matrix to fill that are the dimensions of the plastic reference vs the number of spectra collected within a single sample
cor_table_manyplastic <- as.data.frame(matrix(ncol = length(poly_labs), nrow = nrow(potp_hyper_corrected@data[["spc"]]), dimnames = list(NULL, poly_labs)))
#Calculating correlations and filling the DF with the values
for(row in 1:nrow(potp_hyper_corrected@data[["spc"]])){
  for(i in seq_along(poly_labs)){
  temp_filter <- dplyr::filter(plastic_ref_lib, poly_lab == poly_labs[i])
  temp_approx <- approxfun()
  cor_table_manyplastic[row,i] <- round(cor(potp_hyper_corrected@data[["spc"]][row,], temp_filter$INTENSITY, method = "pearson"), digits = 3)
}
}
#Creating an empty df to hold the identified plastic info in
plastic_lab <- as.data.frame(matrix(nrow = nrow(cor_table_manyplastic), ncol = 2))

colnames(plastic_lab)  <- c("Hit_Index_Value","Polymer_ID")

rownames(plastic_lab) <- plastic_test_files
#Search the correlation matrix for plastic that are the highest correlated to the spectra with the filename (or really particle name).
for (d in 1:nrow(cor_table_manyplastic)){
  plastic_lab[d,1]<-cor_table_manyplastic[d,which.max(cor_table_manyplastic[d,])]
  plastic_lab[d,2]<-colnames(cor_table_manyplastic[which.max(cor_table_manyplastic[d,])])
  
  }
#Filter spectra that don't meet the spectra limit
plastic_lab_filt <- plastic_lab %>% 
  rownames_to_column('filename') %>% 
  dplyr::filter(Hit_Index_Value > 0.22) %>% 
  column_to_rownames('filename')

#Summarise the counts for each polymer - But I need to have a way to add to a df with polymers unidentified in the sample but we have references for.
plastic_lab_count <- group_by(plastic_lab_filt, Polymer_ID) %>% summarise(n())

plastic_lab_count

ggtexttable(plastic_lab_count)

ggtexttable(plastic_lab_filt)
#Does this pipeline hold up to with the new spectral data?
#If so, I need to add in additional reference from openspecy, data which I can download
#Making notes of each step to make it more readable for future reference
setwd("/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/Antarctic_Microplastic_Raman_Spectra/7_06_23/Stn_R/Surface/less_20/")
#Creates a list of all file names within the desired folder 
#Each folder with house an entire samples spectral data
plastic_test_files <- list.files(path = "/Users/christophercarnivale/Desktop/Dissertation_data/Raman Spectral Data copy/Antarctic_Microplastic_Raman_Spectra/7_06_23/Stn_R/Surface/less_20/", pattern = "*.txt")
#Index values to be looped over
file_numbers <- seq(plastic_test_files)
#Blank matrix table to be inserted into an hyperspec object
plastic_test_spc_table <- matrix()
#Desired range of spectral data for identification
#data range collected is much larger, ranging form ~100 - ~2500 wavelength
#This frequency index is for the inclusion of the oringinal library I can extend the range when I remove the use of the original library by calling the open_spec_ref_lib df instead of the merge test
freq_index <- seq(780, 1750, by = 0.1)
#Empty dataframe from which to add in each spectra
all_sample_particle_WV <- as.data.frame(freq_index)

#start of a larger raman data import function need to uncomment for it to work

#Raman_large_import <- function(filepath){
  #freq_index <- seq(780, 1750, by = 1)

#all_sample_particle_WV <- as.data.frame(freq_index)

#for loop over .txt files and create a df of spectra
#This loops and adds the smoothed version of the spectra within the wavelength ranges desired, which can be changed at any time by changing the "freq_index" object
for(filename in plastic_test_files){
  temp_csv <- read.delim(file = filename, header = F, sep = "\t")
  colnames(temp_csv) <- c("Wavelength", "Counts")
  temp_csv_matrix <- as.matrix(temp_csv)
  approx_test_fun <- approxfun(x = temp_csv_matrix[,'Wavelength'], y = temp_csv_matrix[,'Counts'], rule = 2)
  new_counts <- approx_test_fun(freq_index)
  new_counts_smoother <- sgolayfilt(new_counts, 3,11)
  all_sample_particle_WV[filename] <- new_counts_smoother
}
#Matrix is in the wrong format and needs to by transposed to fit the hyperspec obj
all_sample_particle_WV_t <- t(all_sample_particle_WV)
#Converting the first column into column names
colnames(all_sample_particle_WV_t) <- all_sample_particle_WV_t[1,]

all_sample_particle_WV_t <- all_sample_particle_WV_t[-1,]
#Extracting the filenames or name of specific spectra being analyzed
potplastic_filename <- rownames(all_sample_particle_WV_t)
#Making hyperspec obj with matrix of spectra with filename meta data
potp_hyper <- as.hyperSpec(all_sample_particle_WV_t, data = data.frame(potplastic_filename))

#This version of as.hyper works and keeps the filenames for each raman spectra

#Baseline correction
potp_baselines <-  spc.fit.poly.below(potp_hyper, poly.order = 6)
#Plotting baseline corrections
plot(potp_hyper-potp_baselines)
title(xlab = "Wavelength",ylab = "Arbitrary unit of excitation")

potp_hyper_corrected <- potp_hyper-potp_baselines

#Standard Normal variate normalization
potp_hyper_corrected@data[["spc"]] <- standardNormalVariate(potp_hyper_corrected@data[["spc"]])

#min-max scaling
potp_hyper_corrected@data[["spc"]] <- (potp_hyper_corrected@data[["spc"]] - min(potp_hyper_corrected@data[["spc"]])) / (max(potp_hyper_corrected@data[["spc"]])-min(potp_hyper_corrected@data[["spc"]]))


plot(potp_hyper_corrected, col = rainbow(40),title.args = list(xlab = "Wavelength",ylab = "Arbitrary unit of Intensity"))
plot(potp_hyper_corrected)
#Implemented the new smoothing algorithm...now I need to implement this identification with the new library and how that works.

#Extracting unique names from reference library
#poly_labs <- as.character(unique(ref_lib$poly_lab))
#remove the last column (why?)
#poly_labs <- poly_labs[-15]

#This previous version took all samples from the study and not just the reference platic. All of the categorized "." were environmental samples thus necessitating removal. I had a filtered df for plastic reference only so use that df for plastic label names.

poly_labs <-as.character(unique(plastic_ref_lib$poly_lab))
#Create an correlation matrix to fill that are the dimensions of the plastic reference vs the number of spectra collected within a single sample
cor_table_manyplastic <- as.data.frame(matrix(ncol = length(OS_plastic_id_name), nrow = nrow(potp_hyper_corrected@data[["spc"]]), dimnames = list(NULL, OS_plastic_id_name)))
#Calculating correlations and filling the DF with the values
for(row in 1:nrow(potp_hyper_corrected@data[["spc"]])){
  for(i in seq_along(OS_plastic_id_name)){
  temp_filter <- dplyr::filter(Merge_test, sample_name == OS_plastic_id_name[i])
  approx_test_fun <- approxfun(x = temp_filter[,'wavenumber'], y = temp_filter[,'intensity'], rule = 2)
  new_counts <- approx_test_fun(freq_index)
  #This frequency index is for the inclusion of the oringinal library I can extend the range when I remove the use of the original library by calling the open_spec_ref_lib df instead of the merge test
  new_counts_smoother <- sgolayfilt(new_counts, 3,11)
  cor_table_manyplastic[row,i] <- round(cor(potp_hyper_corrected@data[["spc"]][row,], new_counts_smoother, method = "pearson"), digits = 3)
}
}

#Debugging... the previous code works for only a small subset of the library. Most of the library fills with NAs
for(row in 1:nrow(potp_hyper_corrected@data[["spc"]])){
  for(i in seq_along(OS_plastic_id_name)){
  temp_filter <- dplyr::filter(Merge_test, sample_name == OS_plastic_id_name[i])
  print(temp_filter)
  approx_test_fun <- approxfun(x = temp_filter[,'wavenumber'], y = temp_filter[,'intensity'], rule = 2)
  new_counts <- approx_test_fun(freq_index)
  #This frequency index is for the inclusion of the oringinal library I can extend the range when I remove the use of the original library by calling the open_spec_ref_lib df instead of the merge test
  new_counts_smoother <- sgolayfilt(new_counts, 3,11)
  cor_table_manyplastic[row,i] <- round(cor(potp_hyper_corrected@data[["spc"]][row,], new_counts_smoother, method = "pearson"), digits = 3)
}
}
#Creating an empty df to hold the identified plastic info in
plastic_lab <- as.data.frame(matrix(nrow = nrow(cor_table_manyplastic), ncol = 2))

colnames(plastic_lab)  <- c("Hit_Index_Value","Polymer_ID")

rownames(plastic_lab) <- plastic_test_files
#Search the correlation matrix for plastic that are the highest correlated to the spectra with the filename (or really particle name).
for (d in 1:nrow(cor_table_manyplastic)){
  plastic_lab[d,1]<-cor_table_manyplastic[d,which.max(cor_table_manyplastic[d,])]
  plastic_lab[d,2]<-colnames(cor_table_manyplastic[which.max(cor_table_manyplastic[d,])])
  
  }
#Filter spectra that don't meet the spectra limit
plastic_lab_filt <- plastic_lab %>% 
  rownames_to_column('filename') %>% 
  dplyr::filter(Hit_Index_Value > 0.2) %>% 
  column_to_rownames('filename')

#Summarise the counts for each polymer - But I need to have a way to add to a df with polymers unidentified in the sample but we have references for.
plastic_lab_count <- group_by(plastic_lab_filt, Polymer_ID) %>% summarise(n())

plastic_lab_count

ggtexttable(plastic_lab_count)

ggtexttable(plastic_lab_filt)

write.csv(plastic_lab_filt, file = "/Users/christophercarnivale/Desktop/Dissertation_data/Microplastic_antarctica/all_plastic_correlations_indexMIN.csv")

write.csv(plastic_lab_count, file = "/Users/christophercarnivale/Desktop/Dissertation_data/Microplastic_antarctica/filtered_plastic_correlations_indexMIN.csv")
derivative_ref_lib <- readRDS("derivative.rds")

derivative_ref_lib[["spectra"]][1:5,1:5]
##    00002e4e3fac430aa1fdfea6e26f85e4 00061dd49cbb71549cf3d530b894ba92
## 1:                               NA                               NA
## 2:                               NA                       0.07754215
## 3:                               NA                       0.07976792
## 4:                               NA                       0.08517078
## 5:                               NA                       0.09375073
##    00087f78d45c571524fce483ef10752e 0008a60c1af45a76ffb91b9cbe1a32e4
## 1:                               NA                               NA
## 2:                               NA                               NA
## 3:                               NA                               NA
## 4:                               NA                               NA
## 5:                               NA                               NA
##    000902ae526db452960c5782843081b4
## 1:                               NA
## 2:                               NA
## 3:                               NA
## 4:                               NA
## 5:                               NA